├── public ├── favicon.ico ├── css │ └── custom.css ├── robots.txt ├── mix-manifest.json ├── fonts │ └── vendor │ │ ├── font-awesome │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ │ └── bootstrap-sass │ │ └── bootstrap │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 ├── .htaccess └── index.php ├── database ├── .gitignore ├── seeds │ ├── DatabaseSeeder.php │ ├── JenisSuratSeeder.php │ └── UsersTableSeeder.php ├── factories │ └── UserFactory.php └── migrations │ ├── 2018_02_01_100439_create_jenis_surats_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2018_02_01_133157_foreign_key_disposisis.php │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2018_02_01_133127_foreign_key_surats.php │ ├── 2018_02_01_095643_create_disposisis_table.php │ └── 2018_02_01_095408_create_surats_table.php ├── bootstrap ├── cache │ └── .gitignore └── app.php ├── storage ├── logs │ └── .gitignore ├── app │ ├── public │ │ └── .gitignore │ └── .gitignore └── framework │ ├── cache │ └── .gitignore │ ├── testing │ └── .gitignore │ ├── views │ └── .gitignore │ ├── sessions │ └── .gitignore │ └── .gitignore ├── composer.phar ├── resources ├── crud-generator │ ├── lang.stub │ ├── views │ │ ├── html │ │ │ ├── form-fields │ │ │ │ ├── password-field.blade.stub │ │ │ │ ├── form-field.blade.stub │ │ │ │ ├── input-field.blade.stub │ │ │ │ ├── textarea-field.blade.stub │ │ │ │ ├── wrap-field.blade.stub │ │ │ │ ├── select-field.blade.stub │ │ │ │ ├── checkbox-field.blade.stub │ │ │ │ └── radio-field.blade.stub │ │ │ ├── form.blade.stub │ │ │ ├── create.blade.stub │ │ │ ├── edit.blade.stub │ │ │ ├── show.blade.stub │ │ │ └── index.blade.stub │ │ └── laravelcollective │ │ │ ├── form-fields │ │ │ ├── password-field.blade.stub │ │ │ ├── textarea-field.blade.stub │ │ │ ├── form-field.blade.stub │ │ │ ├── input-field.blade.stub │ │ │ ├── select-field.blade.stub │ │ │ ├── radio-field.blade.stub │ │ │ ├── checkbox-field.blade.stub │ │ │ └── wrap-field.blade.stub │ │ │ ├── form.blade.stub │ │ │ ├── create.blade.stub │ │ │ ├── edit.blade.stub │ │ │ ├── show.blade.stub │ │ │ └── index.blade.stub │ ├── migration.stub │ ├── model.stub │ ├── api-controller.stub │ └── controller.stub ├── views │ ├── vue.blade.php │ ├── admin │ │ ├── dashboard.blade.php │ │ └── sidebar.blade.php │ ├── jenis-surat │ │ ├── form.blade.php │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── show.blade.php │ │ └── index.blade.php │ ├── home.blade.php │ ├── disposisi │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── form.blade.php │ │ └── index.blade.php │ ├── user │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── form.blade.php │ │ ├── show.blade.php │ │ └── index.blade.php │ ├── surat │ │ ├── edit.blade.php │ │ ├── create.blade.php │ │ ├── show.blade.php │ │ ├── form.blade.php │ │ ├── laporan.blade.php │ │ └── index.blade.php │ ├── auth │ │ ├── passwords │ │ │ ├── email.blade.php │ │ │ └── reset.blade.php │ │ ├── login.blade.php │ │ └── register.blade.php │ ├── layouts │ │ └── app.blade.php │ └── welcome.blade.php ├── assets │ ├── sass │ │ ├── app.scss │ │ └── _variables.scss │ └── js │ │ ├── app.js │ │ ├── components │ │ └── ExampleComponent.vue │ │ ├── bootstrap.js │ │ └── pages │ │ └── Surat.vue └── lang │ ├── en │ ├── pagination.php │ ├── auth.php │ └── passwords.php │ └── id │ ├── pagination.php │ ├── auth.php │ └── passwords.php ├── .gitattributes ├── .gitignore ├── tests ├── TestCase.php ├── Unit │ └── ExampleTest.php ├── Feature │ └── ExampleTest.php └── CreatesApplication.php ├── app ├── Http │ ├── Middleware │ │ ├── EncryptCookies.php │ │ ├── VerifyCsrfToken.php │ │ ├── TrimStrings.php │ │ ├── HakAdmin.php │ │ ├── RedirectIfAuthenticated.php │ │ └── TrustProxies.php │ ├── Controllers │ │ ├── Controller.php │ │ ├── HomeController.php │ │ ├── Auth │ │ │ ├── ForgotPasswordController.php │ │ │ ├── ResetPasswordController.php │ │ │ ├── LoginController.php │ │ │ └── RegisterController.php │ │ ├── JenisSuratController.php │ │ ├── UserController.php │ │ └── DisposisiController.php │ └── Kernel.php ├── Providers │ ├── BroadcastServiceProvider.php │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── User.php ├── JenisSurat.php ├── Disposisi.php ├── Console │ └── Kernel.php ├── Surat.php └── Exceptions │ └── Handler.php ├── routes ├── channels.php ├── api.php ├── console.php └── web.php ├── webpack.mix.js ├── server.php ├── .env.example ├── LICENSE ├── config ├── view.php ├── services.php ├── broadcasting.php ├── filesystems.php ├── crudgenerator.php ├── queue.php ├── cache.php ├── auth.php ├── database.php └── mail.php ├── phpunit.xml ├── README.md ├── package.json ├── composer.json └── artisan /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/css/custom.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /composer.phar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webowodev/simsurat/HEAD/composer.phar -------------------------------------------------------------------------------- /resources/crud-generator/lang.stub: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/fonts/vendor/font-awesome/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webowodev/simsurat/HEAD/public/fonts/vendor/font-awesome/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /resources/views/vue.blade.php: -------------------------------------------------------------------------------- 1 | @extends ('layouts.app') 2 | @section ('content') 3 | @foreach ($components as $component) 4 | {!! $component !!} 5 | @endforeach 6 | @endsection -------------------------------------------------------------------------------- /public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webowodev/simsurat/HEAD/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webowodev/simsurat/HEAD/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webowodev/simsurat/HEAD/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webowodev/simsurat/HEAD/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /resources/crud-generator/views/html/form-fields/form-field.blade.stub: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/crud-generator/views/html/form-fields/input-field.blade.stub: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /public/hot 3 | /public/storage 4 | /storage/*.key 5 | /vendor 6 | /.idea 7 | /.vscode 8 | /.vagrant 9 | Homestead.json 10 | Homestead.yaml 11 | npm-debug.log 12 | yarn-error.log 13 | .env 14 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | {{ $%%crudNameSingular%%->%%itemName%% or ''}} -------------------------------------------------------------------------------- /resources/crud-generator/views/laravelcollective/form-fields/password-field.blade.stub: -------------------------------------------------------------------------------- 1 | {!! Form::password('%%itemName%%', ('%%required%%' == 'required') ? ['class' => 'form-control', 'required' => 'required'] : ['class' => 'form-control']) !!} -------------------------------------------------------------------------------- /resources/crud-generator/views/laravelcollective/form-fields/textarea-field.blade.stub: -------------------------------------------------------------------------------- 1 | {!! Form::textarea('%%itemName%%', null, ('%%required%%' == 'required') ? ['class' => 'form-control', 'required' => 'required'] : ['class' => 'form-control']) !!} -------------------------------------------------------------------------------- /resources/crud-generator/views/laravelcollective/form-fields/form-field.blade.stub: -------------------------------------------------------------------------------- 1 | {!! Form::%%fieldType%%('%%itemName%%', null, ('%%required%%' == 'required') ? ['class' => 'form-control', 'required' => 'required'] : ['class' => 'form-control']) !!} -------------------------------------------------------------------------------- /resources/crud-generator/views/laravelcollective/form-fields/input-field.blade.stub: -------------------------------------------------------------------------------- 1 | {!! Form::input('%%fieldType%%', '%%itemName%%', null, ('%%required%%' == 'required') ? ['class' => 'form-control', 'required' => 'required'] : ['class' => 'form-control']) !!} -------------------------------------------------------------------------------- /resources/crud-generator/views/laravelcollective/form-fields/select-field.blade.stub: -------------------------------------------------------------------------------- 1 | {!! Form::select('%%itemName%%', json_decode('%%options%%', true), null, ('%%required%%' == 'required') ? ['class' => 'form-control', 'required' => 'required'] : ['class' => 'form-control']) !!} -------------------------------------------------------------------------------- /resources/crud-generator/views/html/form.blade.stub: -------------------------------------------------------------------------------- 1 | %%formFieldsHtml%% 2 | 3 |
4 |
5 | 6 |
7 |
8 | -------------------------------------------------------------------------------- /resources/crud-generator/views/laravelcollective/form-fields/radio-field.blade.stub: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |
5 | 6 |
-------------------------------------------------------------------------------- /resources/crud-generator/views/laravelcollective/form-fields/checkbox-field.blade.stub: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |
5 | 6 |
-------------------------------------------------------------------------------- /resources/crud-generator/views/laravelcollective/form.blade.stub: -------------------------------------------------------------------------------- 1 | %%formFieldsHtml%% 2 | 3 |
4 |
5 | {!! Form::submit(isset($submitButtonText) ? $submitButtonText : 'Create', ['class' => 'btn btn-primary']) !!} 6 |
7 |
8 | -------------------------------------------------------------------------------- /resources/assets/sass/app.scss: -------------------------------------------------------------------------------- 1 | 2 | // Fonts 3 | @import url("https://fonts.googleapis.com/css?family=Raleway:300,400,600"); 4 | 5 | // Variables 6 | @import "variables"; 7 | 8 | // Bootstrap 9 | @import "~bootstrap-sass/assets/stylesheets/bootstrap"; 10 | @import "~font-awesome/scss/font-awesome"; 11 | @import "~select2/dist/css/select2.min.css"; 12 | -------------------------------------------------------------------------------- /resources/crud-generator/views/html/form-fields/wrap-field.blade.stub: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | %3$s 5 | {!! $errors->first('%1$s', '

:message

') !!} 6 |
7 |
-------------------------------------------------------------------------------- /resources/crud-generator/views/laravelcollective/form-fields/wrap-field.blade.stub: -------------------------------------------------------------------------------- 1 |
2 | {!! Form::label('%1$s', %2$s, ['class' => 'col-md-4 control-label']) !!} 3 |
4 | %3$s 5 | {!! $errors->first('%1$s', '

:message

') !!} 6 |
7 |
-------------------------------------------------------------------------------- /database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(JenisSuratSeeder::class); 15 | $this->call(UsersTableSeeder::class); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | 2 | @foreach (json_decode('%%options%%', true) as $optionKey => $optionValue) 3 | 4 | @endforeach 5 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | get('/'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /resources/crud-generator/views/html/form-fields/checkbox-field.blade.stub: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |
5 | 6 |
-------------------------------------------------------------------------------- /resources/crud-generator/views/html/form-fields/radio-field.blade.stub: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |
5 | 6 |
-------------------------------------------------------------------------------- /database/seeds/JenisSuratSeeder.php: -------------------------------------------------------------------------------- 1 | 'Surat Resmi']); 15 | JenisSurat::create(['name' => 'Surat Setengah Resmi']); 16 | JenisSurat::create(['name' => 'Surat Pribadi']); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | user()->hak!='admin') { 19 | return abort(404); 20 | } 21 | return $next($request); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/seeds/UsersTableSeeder.php: -------------------------------------------------------------------------------- 1 | 'Admin', 'username' => 'admin', 'password' => bcrypt('123456'),'hak' => 'admin']); 15 | User::create(['name' => 'User 1', 'username' => 'user1', 'password' => bcrypt('123456'),'hak' => 'normal']); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /resources/crud-generator/migration.stub: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 20 | 21 | Hash::setRounds(4); 22 | 23 | return $app; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /resources/crud-generator/model.stub: -------------------------------------------------------------------------------- 1 | id === (int) $id; 16 | }); 17 | -------------------------------------------------------------------------------- /app/Http/Controllers/HomeController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 17 | } 18 | 19 | /** 20 | * Show the application dashboard. 21 | * 22 | * @return \Illuminate\Http\Response 23 | */ 24 | public function index() 25 | { 26 | return view('home'); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /resources/views/admin/dashboard.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 | @include('admin.sidebar') 7 | 8 |
9 |
10 |
Dashboard
11 | 12 |
13 | Your application's dashboard. 14 |
15 |
16 |
17 |
18 |
19 | @endsection 20 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 17 | return $request->user(); 18 | }); 19 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 18 | })->describe('Display an inspiring quote'); 19 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | let mix = require('laravel-mix'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Mix Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Mix provides a clean, fluent API for defining some Webpack build steps 9 | | for your Laravel application. By default, we are compiling the Sass 10 | | file for the application as well as bundling up all the JS files. 11 | | 12 | */ 13 | 14 | mix.js('resources/assets/js/app.js', 'public/js') 15 | .sass('resources/assets/sass/app.scss', 'public/css') 16 | .browserSync('localhost:8000'); 17 | -------------------------------------------------------------------------------- /server.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | check()) { 21 | return redirect('/'); 22 | } 23 | 24 | return $next($request); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /resources/lang/id/pagination.php: -------------------------------------------------------------------------------- 1 | '« Sebelumnya', 16 | 'next' => 'Berikutnya »', 17 | ]; 18 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Handle Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /resources/assets/js/app.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * First we will load all of this project's JavaScript dependencies which 4 | * includes Vue and other libraries. It is a great starting point when 5 | * building robust, powerful web applications using Vue and Laravel. 6 | */ 7 | 8 | require('./bootstrap'); 9 | window.Vue = require('vue'); 10 | 11 | /** 12 | * Next, we will create a fresh Vue application instance and attach it to 13 | * the page. Then, you may begin adding components to this application 14 | * or customize the JavaScript scaffolding to fit your unique needs. 15 | */ 16 | 17 | Vue.component('surat', require('./pages/Surat.vue')); 18 | 19 | const app = new Vue({ 20 | el: '#app' 21 | }); 22 | -------------------------------------------------------------------------------- /resources/assets/js/components/ExampleComponent.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 24 | -------------------------------------------------------------------------------- /resources/views/jenis-surat/form.blade.php: -------------------------------------------------------------------------------- 1 |
2 | {!! Form::label('name', 'Name', ['class' => 'col-md-4 control-label']) !!} 3 |
4 | {!! Form::text('name', null, ('' == 'required') ? ['class' => 'form-control', 'required' => 'required'] : ['class' => 'form-control']) !!} 5 | {!! $errors->first('name', '

:message

') !!} 6 |
7 |
8 | 9 |
10 |
11 | {!! Form::submit(isset($submitButtonText) ? $submitButtonText : 'Create', ['class' => 'btn btn-primary']) !!} 12 |
13 |
14 | -------------------------------------------------------------------------------- /app/User.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/id/auth.php: -------------------------------------------------------------------------------- 1 | 'Identitas tersebut tidak cocok dengan data kami.', 16 | 'throttle' => 'Terlalu banyak usaha masuk. Silahkan coba lagi dalam :seconds detik.', 17 | ]; 18 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_LOG_LEVEL=debug 6 | APP_URL=http://localhost 7 | 8 | DB_CONNECTION=mysql 9 | DB_HOST=127.0.0.1 10 | DB_PORT=3306 11 | DB_DATABASE=homestead 12 | DB_USERNAME=homestead 13 | DB_PASSWORD=secret 14 | 15 | BROADCAST_DRIVER=log 16 | CACHE_DRIVER=file 17 | SESSION_DRIVER=file 18 | SESSION_LIFETIME=120 19 | QUEUE_DRIVER=sync 20 | 21 | REDIS_HOST=127.0.0.1 22 | REDIS_PASSWORD=null 23 | REDIS_PORT=6379 24 | 25 | MAIL_DRIVER=smtp 26 | MAIL_HOST=smtp.mailtrap.io 27 | MAIL_PORT=2525 28 | MAIL_USERNAME=null 29 | MAIL_PASSWORD=null 30 | MAIL_ENCRYPTION=null 31 | 32 | PUSHER_APP_ID= 33 | PUSHER_APP_KEY= 34 | PUSHER_APP_SECRET= 35 | PUSHER_APP_CLUSTER=mt1 36 | -------------------------------------------------------------------------------- /app/Providers/AuthServiceProvider.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any authentication / authorization services. 21 | * 22 | * @return void 23 | */ 24 | public function boot() 25 | { 26 | $this->registerPolicies(); 27 | 28 | // 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /resources/views/home.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Dashboard
9 | 10 |
11 | @if (session('status')) 12 |
13 | {{ session('status') }} 14 |
15 | @endif 16 | 17 | You are logged in! 18 |
19 |
20 |
21 |
22 |
23 | @endsection 24 | -------------------------------------------------------------------------------- /app/Providers/EventServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'App\Listeners\EventListener', 18 | ], 19 | ]; 20 | 21 | /** 22 | * Register any events for your application. 23 | * 24 | * @return void 25 | */ 26 | public function boot() 27 | { 28 | parent::boot(); 29 | 30 | // 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/JenisSurat.php: -------------------------------------------------------------------------------- 1 | hasMany('App\Surat'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustProxies.php: -------------------------------------------------------------------------------- 1 | 'FORWARDED', 24 | Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR', 25 | Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST', 26 | Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT', 27 | Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO', 28 | ]; 29 | } 30 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | define(App\User::class, function (Faker $faker) { 17 | return [ 18 | 'name' => $faker->name, 19 | 'email' => $faker->unique()->safeEmail, 20 | 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret 21 | 'remember_token' => str_random(10), 22 | ]; 23 | }); 24 | -------------------------------------------------------------------------------- /database/migrations/2018_02_01_100439_create_jenis_surats_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name'); 19 | $table->timestamps(); 20 | $table->softDeletes(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::dropIfExists('jenis_surats'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token'); 19 | $table->timestamp('created_at')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('password_resets'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Passwords must be at least six characters and match the confirmation.', 17 | 'reset' => 'Your password has been reset!', 18 | 'sent' => 'We have e-mailed your password reset link!', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that e-mail address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | group(function () { 21 | Route::resource('user', 'UserController'); 22 | Route::resource('jenis-surat', 'JenisSuratController'); 23 | Route::get('surat/laporan', 'SuratController@laporan'); 24 | Route::resource('surat', 'SuratController'); 25 | Route::resource('disposisi', 'DisposisiController'); 26 | }); -------------------------------------------------------------------------------- /app/Disposisi.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\Surat'); 35 | } 36 | 37 | public function user () 38 | { 39 | return $this->belongsTo('App\User'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /database/migrations/2018_02_01_133157_foreign_key_disposisis.php: -------------------------------------------------------------------------------- 1 | foreign('surat_id')->references('id')->on('surats')->onDelete('cascade')->onUpdate('cascade'); 18 | $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade')->onUpdate('cascade'); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | Schema::table('disposisis', function (Blueprint $table) { 30 | // 31 | }); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /resources/lang/id/passwords.php: -------------------------------------------------------------------------------- 1 | 'Kata sandi minimal harus memiliki enam karakter dan cocok dengan konfirmasi.', 16 | 'reset' => 'Kata sandi Anda sudah direset!', 17 | 'sent' => 'Kami sudah mengirim surel yang berisi tautan untuk mereset kata sandi Anda!', 18 | 'token' => 'Token pengaturan ulang kata sandi tidak sah.', 19 | 'user' => 'Kami tidak dapat menemukan pengguna dengan alamat surel tersebut.', 20 | ]; 21 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ForgotPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire') 28 | // ->hourly(); 29 | } 30 | 31 | /** 32 | * Register the commands for the application. 33 | * 34 | * @return void 35 | */ 36 | protected function commands() 37 | { 38 | $this->load(__DIR__.'/Commands'); 39 | 40 | require base_path('routes/console.php'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 Dimas Wibowo 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | \increments('id'); 18 | $table->string('name'); 19 | $table->string('username')->unique(); 20 | $table->string('password'); 21 | $table->enum('hak', ['admin','normal']); 22 | $table->rememberToken(); 23 | $table->timestamps(); 24 | $table->softDeletes(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::dropIfExists('users'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /resources/views/disposisi/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 | @include('admin.sidebar') 7 | 8 |
9 |
10 |
Create New Disposisi
11 |
12 | 13 |
14 |
15 | 16 | 17 | {!! Form::open(['url' => '/disposisi', 'class' => 'form-horizontal', 'files' => true]) !!} 18 | 19 | @include ('disposisi.form') 20 | 21 | {!! Form::close() !!} 22 | 23 |
24 |
25 |
26 |
27 |
28 | @endsection 29 | -------------------------------------------------------------------------------- /resources/views/user/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 | @include('admin.sidebar') 7 | 8 |
9 |
10 |
Create New User
11 |
12 | 13 |
14 |
15 | 16 | 17 | 18 | {!! Form::open(['url' => '/user', 'class' => 'form-horizontal', 'files' => true]) !!} 19 | 20 | @include ('user.form') 21 | 22 | {!! Form::close() !!} 23 | 24 |
25 |
26 |
27 |
28 |
29 | @endsection 30 | -------------------------------------------------------------------------------- /resources/assets/sass/_variables.scss: -------------------------------------------------------------------------------- 1 | 2 | // Body 3 | $body-bg: #f5f8fa; 4 | 5 | // Borders 6 | $laravel-border-color: darken($body-bg, 10%); 7 | $list-group-border: $laravel-border-color; 8 | $navbar-default-border: $laravel-border-color; 9 | $panel-default-border: $laravel-border-color; 10 | $panel-inner-border: $laravel-border-color; 11 | 12 | // Brands 13 | $brand-primary: #3097D1; 14 | $brand-info: #8eb4cb; 15 | $brand-success: #2ab27b; 16 | $brand-warning: #cbb956; 17 | $brand-danger: #bf5329; 18 | 19 | // Typography 20 | $icon-font-path: "~bootstrap-sass/assets/fonts/bootstrap/"; 21 | $font-family-sans-serif: "Raleway", sans-serif; 22 | $font-size-base: 14px; 23 | $line-height-base: 1.6; 24 | $text-color: #636b6f; 25 | 26 | // Navbar 27 | $navbar-default-bg: #fff; 28 | 29 | // Buttons 30 | $btn-default-color: $text-color; 31 | 32 | // Inputs 33 | $input-border: lighten($text-color, 40%); 34 | $input-border-focus: lighten($brand-primary, 25%); 35 | $input-color-placeholder: lighten($text-color, 30%); 36 | 37 | // Panels 38 | $panel-default-heading-bg: #fff; 39 | -------------------------------------------------------------------------------- /resources/views/jenis-surat/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 | @include('admin.sidebar') 7 | 8 |
9 |
10 |
Create New JenisSurat
11 |
12 | 13 |
14 |
15 | 16 | 17 | 18 | {!! Form::open(['url' => '/jenis-surat', 'class' => 'form-horizontal', 'files' => true]) !!} 19 | 20 | @include ('jenis-surat.form') 21 | 22 | {!! Form::close() !!} 23 | 24 |
25 |
26 |
27 |
28 |
29 | @endsection 30 | -------------------------------------------------------------------------------- /database/migrations/2018_02_01_133127_foreign_key_surats.php: -------------------------------------------------------------------------------- 1 | foreign('jenis_surat_id')->references('id')->on('jenis_surats')->onDelete('cascade')->onUpdate('cascade'); 18 | $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade')->onUpdate('cascade'); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | Schema::table('surats', function (Blueprint $table) { 30 | $table->dropForeign('surats_jenis_surat_id_foreign'); 31 | $table->dropForeign('surats_user_id_foreign'); 32 | }); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/Surat.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\JenisSurat'); 35 | } 36 | 37 | public function user () 38 | { 39 | return $this->belongsTo('App\User'); 40 | } 41 | 42 | public function disposisis () 43 | { 44 | return $this->hasMany('App\Disposisi'); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('views'), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => realpath(storage_path('framework/views')), 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | ], 21 | 22 | 'ses' => [ 23 | 'key' => env('SES_KEY'), 24 | 'secret' => env('SES_SECRET'), 25 | 'region' => 'us-east-1', 26 | ], 27 | 28 | 'sparkpost' => [ 29 | 'secret' => env('SPARKPOST_SECRET'), 30 | ], 31 | 32 | 'stripe' => [ 33 | 'model' => App\User::class, 34 | 'key' => env('STRIPE_KEY'), 35 | 'secret' => env('STRIPE_SECRET'), 36 | ], 37 | 38 | ]; 39 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ResetPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /database/migrations/2018_02_01_095643_create_disposisis_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('no_disposisi'); 19 | $table->string('no_agenda'); 20 | $table->integer('surat_id')->unsigned(); 21 | $table->string('kepada'); 22 | $table->text('keterangan'); 23 | $table->string('tanggapan'); 24 | $table->integer('user_id')->unsigned(); 25 | $table->timestamps(); 26 | $table->softDeletes(); 27 | }); 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | Schema::dropIfExists('disposisis'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests/Feature 14 | 15 | 16 | 17 | ./tests/Unit 18 | 19 | 20 | 21 | 22 | ./app 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /resources/views/admin/sidebar.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | Sidebar 5 |
6 | 7 |
8 | 27 |
28 |
29 |
30 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/LoginController.php: -------------------------------------------------------------------------------- 1 | middleware('guest')->except('logout'); 38 | } 39 | 40 | public function username () 41 | { 42 | return 'username'; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /database/migrations/2018_02_01_095408_create_surats_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('no_surat'); 19 | $table->string('no_agenda'); 20 | $table->integer('jenis_surat_id')->unsigned(); 21 | $table->date('tanggal_kirim'); 22 | $table->date('tanggal_terima')->nullable(); 23 | $table->string('pengirim'); 24 | $table->string('perihal'); 25 | $table->enum('tipe', ['masuk','keluar']); 26 | $table->integer('user_id')->unsigned(); 27 | $table->timestamps(); 28 | $table->softDeletes(); 29 | 30 | }); 31 | } 32 | 33 | /** 34 | * Reverse the migrations. 35 | * 36 | * @return void 37 | */ 38 | public function down() 39 | { 40 | Schema::dropIfExists('surats'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SIM SURAT 2 | Aplikasi Sistem Manajemen Surat Sederhana dengan laravel v5.5. System requirementsnya liat di sini yah https://laravel.com/docs/5.5/#server-requirements 3 | 4 | # Konfigurasi 5 | Setelah download/clone jalankan perintah berikut untuk menginstall dependency composer via command prompt/terminal etc. 6 | 7 | ```bash 8 | cd simsurat 9 | php composer.phar install 10 | ``` 11 | 12 | # Setup Database 13 | Copy file .env.example dengan nama .env dan sesuaikan konfigurasi database anda. Contoh 14 | ```php 15 | DB_DATABASE=manajemen_surat 16 | DB_USERNAME=root 17 | DB_PASSWORD=passwordmysql 18 | ``` 19 | Kemudian jalankan perintah berikut untuk menggenerate key 20 | ```bash 21 | php artisan key:generate 22 | ``` 23 | # Migrasi Database 24 | Jalankan perintah berikut untuk generate tabel 25 | ```bash 26 | php artisan migrate --seed 27 | ``` 28 | Jalankan perintah berikut untuk serve aplikasi 29 | 30 | ```bash 31 | php artisan serve 32 | ``` 33 | Kemudian akses http://localhost:8000 via browser kesukaan lo 34 | Jadi deh ^_^ 35 | 36 | # Pengguna 37 | Untuk demo login dengan menggunakan username/password admin/123456 untuk hak akses admin dan user1/123456 untuk hak akses normal 38 | 39 | # License 40 | This project is licensed under the MIT License - see the [License File](LICENSE) for details 41 | -------------------------------------------------------------------------------- /resources/views/user/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 | @include('admin.sidebar') 7 | 8 |
9 |
10 |
Edit User #{{ $user->id }}
11 |
12 | 13 |
14 |
15 | 16 | 17 | 18 | {!! Form::model($user, [ 19 | 'method' => 'PATCH', 20 | 'url' => ['/user', $user->id], 21 | 'class' => 'form-horizontal', 22 | 'files' => true 23 | ]) !!} 24 | 25 | @include ('user.form', ['submitButtonText' => 'Update']) 26 | 27 | {!! Form::close() !!} 28 | 29 |
30 |
31 |
32 |
33 |
34 | @endsection 35 | -------------------------------------------------------------------------------- /resources/views/disposisi/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 | @include('admin.sidebar') 7 | 8 |
9 |
10 |
Edit Disposisi #{{ $disposisi->id }}
11 |
12 | 13 |
14 |
15 | 16 | {!! Form::model($disposisi, [ 17 | 'method' => 'PATCH', 18 | 'url' => ['/disposisi', $disposisi->id], 19 | 'class' => 'form-horizontal', 20 | 'files' => true 21 | ]) !!} 22 | 23 | @include ('disposisi.form', ['submitButtonText' => 'Update']) 24 | 25 | {!! Form::close() !!} 26 | 27 |
28 |
29 |
30 |
31 |
32 | @endsection 33 | -------------------------------------------------------------------------------- /resources/views/jenis-surat/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 | @include('admin.sidebar') 7 | 8 |
9 |
10 |
Edit JenisSurat #{{ $jenissurat->id }}
11 |
12 | 13 |
14 |
15 | 16 | 17 | 18 | {!! Form::model($jenissurat, [ 19 | 'method' => 'PATCH', 20 | 'url' => ['/jenis-surat', $jenissurat->id], 21 | 'class' => 'form-horizontal', 22 | 'files' => true 23 | ]) !!} 24 | 25 | @include ('jenis-surat.form', ['submitButtonText' => 'Update']) 26 | 27 | {!! Form::close() !!} 28 | 29 |
30 |
31 |
32 |
33 |
34 | @endsection 35 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | 5 |
6 | @include('admin.sidebar') 7 | 8 |
9 |
10 |
Create New %%modelName%%
11 |
12 | 13 |
14 |
15 | 16 | @if ($errors->any()) 17 |
    18 | @foreach ($errors->all() as $error) 19 |
  • {{ $error }}
  • 20 | @endforeach 21 |
22 | @endif 23 | 24 | {!! Form::open(['url' => '/%%routeGroup%%%%viewName%%', 'class' => 'form-horizontal', 'files' => true]) !!} 25 | 26 | @include ('%%viewTemplateDir%%.form') 27 | 28 | {!! Form::close() !!} 29 | 30 |
31 |
32 |
33 |
34 | 35 | @endsection 36 | -------------------------------------------------------------------------------- /resources/views/surat/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 | @include('admin.sidebar') 7 | 8 |
9 |
10 |
Edit Surat #{{ $surat->id }}
11 |
12 | 13 |
14 |
15 | 16 | {!! Form::model($surat, [ 17 | 'method' => 'PATCH', 18 | 'url' => ['/surat', $surat->id], 19 | 'class' => 'form-horizontal', 20 | 'files' => true 21 | ]) !!} 22 | 23 | @include ('surat.form', ['submitButtonText' => 'Update']) 24 | 25 | {!! Form::close() !!} 26 | 27 |
28 |
29 |
30 |
31 |
32 | @endsection 33 | 34 | @section('scripts') 35 | 42 | @endsection 43 | 44 | -------------------------------------------------------------------------------- /resources/crud-generator/views/html/create.blade.stub: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 | @include('admin.sidebar') 7 | 8 |
9 |
10 |
Create New %%modelName%%
11 |
12 | 13 |
14 |
15 | 16 | @if ($errors->any()) 17 |
    18 | @foreach ($errors->all() as $error) 19 |
  • {{ $error }}
  • 20 | @endforeach 21 |
22 | @endif 23 | 24 |
25 | {{ csrf_field() }} 26 | 27 | @include ('%%viewTemplateDir%%.form') 28 | 29 |
30 | 31 |
32 |
33 |
34 |
35 |
36 | @endsection 37 | -------------------------------------------------------------------------------- /resources/views/surat/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 | @include('admin.sidebar') 7 | 8 |
9 |
10 |
Create New Surat
11 |
12 | 13 |
14 |
15 | 16 | {!! Form::open(['url' => '/surat', 'class' => 'form-horizontal', 'files' => true]) !!} 17 | 18 | @include ('surat.form') 19 | 20 | {!! Form::close() !!} 21 | 22 |
23 |
24 |
25 |
26 |
27 | @endsection 28 | 29 | @section('scripts') 30 | 46 | @endsection -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "description": "The Laravel Framework.", 4 | "keywords": ["framework", "laravel"], 5 | "license": "MIT", 6 | "type": "project", 7 | "require": { 8 | "php": ">=7.0.0", 9 | "fideloper/proxy": "~3.3", 10 | "laravel/framework": "5.5.*", 11 | "laravel/tinker": "~1.0" 12 | }, 13 | "require-dev": { 14 | "appzcoder/crud-generator": "^3.0", 15 | "filp/whoops": "~2.0", 16 | "fzaninotto/faker": "~1.4", 17 | "mockery/mockery": "~1.0", 18 | "phpunit/phpunit": "~6.0", 19 | "symfony/thanks": "^1.0" 20 | }, 21 | "autoload": { 22 | "classmap": [ 23 | "database/seeds", 24 | "database/factories" 25 | ], 26 | "psr-4": { 27 | "App\\": "app/" 28 | } 29 | }, 30 | "autoload-dev": { 31 | "psr-4": { 32 | "Tests\\": "tests/" 33 | } 34 | }, 35 | "extra": { 36 | "laravel": { 37 | "dont-discover": [ 38 | ] 39 | } 40 | }, 41 | "scripts": { 42 | "post-root-package-install": [ 43 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 44 | ], 45 | "post-create-project-cmd": [ 46 | "@php artisan key:generate" 47 | ], 48 | "post-autoload-dump": [ 49 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 50 | "@php artisan package:discover" 51 | ] 52 | }, 53 | "config": { 54 | "preferred-install": "dist", 55 | "sort-packages": true, 56 | "optimize-autoloader": true 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /resources/crud-generator/views/html/edit.blade.stub: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 | @include('admin.sidebar') 7 | 8 |
9 |
10 |
Edit %%modelName%% #{{ $%%crudNameSingular%%->%%primaryKey%% }}
11 |
12 | 13 |
14 |
15 | 16 | @if ($errors->any()) 17 |
    18 | @foreach ($errors->all() as $error) 19 |
  • {{ $error }}
  • 20 | @endforeach 21 |
22 | @endif 23 | 24 |
25 | {{ method_field('PATCH') }} 26 | {{ csrf_field() }} 27 | 28 | @include ('%%viewTemplateDir%%.form', ['submitButtonText' => 'Update']) 29 | 30 |
31 | 32 |
33 |
34 |
35 |
36 |
37 | @endsection 38 | -------------------------------------------------------------------------------- /resources/crud-generator/views/laravelcollective/edit.blade.stub: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 | @include('admin.sidebar') 7 | 8 |
9 |
10 |
Edit %%modelName%% #{{ $%%crudNameSingular%%->%%primaryKey%% }}
11 |
12 | 13 |
14 |
15 | 16 | @if ($errors->any()) 17 |
    18 | @foreach ($errors->all() as $error) 19 |
  • {{ $error }}
  • 20 | @endforeach 21 |
22 | @endif 23 | 24 | {!! Form::model($%%crudNameSingular%%, [ 25 | 'method' => 'PATCH', 26 | 'url' => ['/%%routeGroup%%%%viewName%%', $%%crudNameSingular%%->%%primaryKey%%], 27 | 'class' => 'form-horizontal', 28 | 'files' => true 29 | ]) !!} 30 | 31 | @include ('%%viewTemplateDir%%.form', ['submitButtonText' => 'Update']) 32 | 33 | {!! Form::close() !!} 34 | 35 |
36 |
37 |
38 |
39 |
40 | @endsection 41 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'null'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Broadcast Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the broadcast connections that will be used 26 | | to broadcast events to other systems or over websockets. Samples of 27 | | each available type of connection are provided inside this array. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'pusher' => [ 34 | 'driver' => 'pusher', 35 | 'key' => env('PUSHER_APP_KEY'), 36 | 'secret' => env('PUSHER_APP_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | 'cluster' => env('PUSHER_APP_CLUSTER'), 40 | 'encrypted' => true, 41 | ], 42 | ], 43 | 44 | 'redis' => [ 45 | 'driver' => 'redis', 46 | 'connection' => 'default', 47 | ], 48 | 49 | 'log' => [ 50 | 'driver' => 'log', 51 | ], 52 | 53 | 'null' => [ 54 | 'driver' => 'null', 55 | ], 56 | 57 | ], 58 | 59 | ]; 60 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | mapApiRoutes(); 39 | 40 | $this->mapWebRoutes(); 41 | 42 | // 43 | } 44 | 45 | /** 46 | * Define the "web" routes for the application. 47 | * 48 | * These routes all receive session state, CSRF protection, etc. 49 | * 50 | * @return void 51 | */ 52 | protected function mapWebRoutes() 53 | { 54 | Route::middleware('web') 55 | ->namespace($this->namespace) 56 | ->group(base_path('routes/web.php')); 57 | } 58 | 59 | /** 60 | * Define the "api" routes for the application. 61 | * 62 | * These routes are typically stateless. 63 | * 64 | * @return void 65 | */ 66 | protected function mapApiRoutes() 67 | { 68 | Route::prefix('api') 69 | ->middleware('api') 70 | ->namespace($this->namespace) 71 | ->group(base_path('routes/api.php')); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 34 | 35 | $status = $kernel->handle( 36 | $input = new Symfony\Component\Console\Input\ArgvInput, 37 | new Symfony\Component\Console\Output\ConsoleOutput 38 | ); 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Shutdown The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once Artisan has finished running, we will fire off the shutdown events 46 | | so that any final work may be done by the application before we shut 47 | | down the process. This is the last thing to happen to the request. 48 | | 49 | */ 50 | 51 | $kernel->terminate($input, $status); 52 | 53 | exit($status); 54 | -------------------------------------------------------------------------------- /resources/assets/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | 2 | window._ = require('lodash'); 3 | 4 | /** 5 | * We'll load jQuery and the Bootstrap jQuery plugin which provides support 6 | * for JavaScript based Bootstrap features such as modals and tabs. This 7 | * code may be modified to fit the specific needs of your application. 8 | */ 9 | 10 | try { 11 | window.$ = window.jQuery = require('jquery'); 12 | require('select2'); 13 | require('jQuery.print'); 14 | $('.select2').select2(); 15 | require('bootstrap-sass'); 16 | } catch (e) {} 17 | 18 | /** 19 | * We'll load the axios HTTP library which allows us to easily issue requests 20 | * to our Laravel back-end. This library automatically handles sending the 21 | * CSRF token as a header based on the value of the "XSRF" token cookie. 22 | */ 23 | 24 | window.axios = require('axios'); 25 | 26 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 27 | 28 | /** 29 | * Next we will register the CSRF Token as a common header with Axios so that 30 | * all outgoing HTTP requests automatically have it attached. This is just 31 | * a simple convenience so we don't have to attach every token manually. 32 | */ 33 | 34 | let token = document.head.querySelector('meta[name="csrf-token"]'); 35 | 36 | if (token) { 37 | window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content; 38 | } else { 39 | console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token'); 40 | } 41 | 42 | /** 43 | * Echo exposes an expressive API for subscribing to channels and listening 44 | * for events that are broadcast by Laravel. Echo and event broadcasting 45 | * allows your team to easily build robust real-time web applications. 46 | */ 47 | 48 | // import Echo from 'laravel-echo' 49 | 50 | // window.Pusher = require('pusher-js'); 51 | 52 | // window.Echo = new Echo({ 53 | // broadcaster: 'pusher', 54 | // key: 'your-pusher-key', 55 | // cluster: 'mt1', 56 | // encrypted: true 57 | // }); 58 | -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | define('LARAVEL_START', microtime(true)); 11 | 12 | /* 13 | |-------------------------------------------------------------------------- 14 | | Register The Auto Loader 15 | |-------------------------------------------------------------------------- 16 | | 17 | | Composer provides a convenient, automatically generated class loader for 18 | | our application. We just need to utilize it! We'll simply require it 19 | | into the script here so that we don't have to worry about manual 20 | | loading any of our classes later on. It feels great to relax. 21 | | 22 | */ 23 | 24 | require __DIR__.'/../vendor/autoload.php'; 25 | 26 | /* 27 | |-------------------------------------------------------------------------- 28 | | Turn On The Lights 29 | |-------------------------------------------------------------------------- 30 | | 31 | | We need to illuminate PHP development, so let us turn on the lights. 32 | | This bootstraps the framework and gets it ready for use, then it 33 | | will load up this application so that we can run it and send 34 | | the responses back to the browser and delight our users. 35 | | 36 | */ 37 | 38 | $app = require_once __DIR__.'/../bootstrap/app.php'; 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Run The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once we have the application, we can handle the incoming request 46 | | through the kernel, and send the associated response back to 47 | | the client's browser allowing them to enjoy the creative 48 | | and wonderful application we have prepared for them. 49 | | 50 | */ 51 | 52 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); 53 | 54 | $response = $kernel->handle( 55 | $request = Illuminate\Http\Request::capture() 56 | ); 57 | 58 | $response->send(); 59 | 60 | $kernel->terminate($request, $response); 61 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/email.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Reset Password
9 | 10 |
11 | @if (session('status')) 12 |
13 | {{ session('status') }} 14 |
15 | @endif 16 | 17 |
18 | {{ csrf_field() }} 19 | 20 |
21 | 22 | 23 |
24 | 25 | 26 | @if ($errors->has('email')) 27 | 28 | {{ $errors->first('email') }} 29 | 30 | @endif 31 |
32 |
33 | 34 |
35 |
36 | 39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | @endsection 48 | -------------------------------------------------------------------------------- /resources/views/user/form.blade.php: -------------------------------------------------------------------------------- 1 |
2 | {!! Form::label('name', 'Name', ['class' => 'col-md-4 control-label']) !!} 3 |
4 | {!! Form::text('name', null, ('' == 'required') ? ['class' => 'form-control', 'required' => 'required'] : ['class' => 'form-control']) !!} 5 | {!! $errors->first('name', '

:message

') !!} 6 |
7 |
8 | {!! Form::label('username', 'Username', ['class' => 'col-md-4 control-label']) !!} 9 |
10 | {!! Form::text('username', null, ('' == 'required') ? ['class' => 'form-control', 'required' => 'required'] : ['class' => 'form-control']) !!} 11 | {!! $errors->first('username', '

:message

') !!} 12 |
13 |
14 | {!! Form::label('password', 'Password', ['class' => 'col-md-4 control-label']) !!} 15 |
16 | {!! Form::password('password', ('' == 'required') ? ['class' => 'form-control', 'required' => 'required'] : ['class' => 'form-control']) !!} 17 | {!! $errors->first('password', '

:message

') !!} 18 |
19 |
20 | {!! Form::label('hak', 'Hak', ['class' => 'col-md-4 control-label']) !!} 21 |
22 | {!! Form::select('hak', json_decode('{"admin":"Admin", "normal":"Normal"}', true), null, ('' == 'required') ? ['class' => 'form-control', 'required' => 'required'] : ['class' => 'form-control']) !!} 23 | {!! $errors->first('hak', '

:message

') !!} 24 |
25 |
26 | 27 |
28 |
29 | {!! Form::submit(isset($submitButtonText) ? $submitButtonText : 'Create', ['class' => 'btn btn-primary']) !!} 30 |
31 |
32 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/RegisterController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 40 | } 41 | 42 | /** 43 | * Get a validator for an incoming registration request. 44 | * 45 | * @param array $data 46 | * @return \Illuminate\Contracts\Validation\Validator 47 | */ 48 | protected function validator(array $data) 49 | { 50 | return Validator::make($data, [ 51 | 'name' => 'required|string|max:255', 52 | 'email' => 'required|string|email|max:255|unique:users', 53 | 'password' => 'required|string|min:6|confirmed', 54 | ]); 55 | } 56 | 57 | /** 58 | * Create a new user instance after a valid registration. 59 | * 60 | * @param array $data 61 | * @return \App\User 62 | */ 63 | protected function create(array $data) 64 | { 65 | return User::create([ 66 | 'name' => $data['name'], 67 | 'email' => $data['email'], 68 | 'password' => bcrypt($data['password']), 69 | ]); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /resources/crud-generator/views/html/show.blade.stub: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 | @include('admin.sidebar') 7 | 8 |
9 |
10 |
%%modelName%% {{ $%%crudNameSingular%%->%%primaryKey%% }}
11 |
12 | 13 | 14 | 15 | 16 |
17 | {{ method_field('DELETE') }} 18 | {{ csrf_field() }} 19 | 20 |
21 |
22 |
23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | %%formBodyHtmlForShowView%% 31 | 32 |
ID{{ $%%crudNameSingular%%->%%primaryKey%% }}
33 |
34 | 35 |
36 |
37 |
38 |
39 |
40 | @endsection 41 | -------------------------------------------------------------------------------- /resources/crud-generator/api-controller.stub: -------------------------------------------------------------------------------- 1 | all()); 36 | 37 | return response()->json(${{crudNameSingular}}, 201); 38 | } 39 | 40 | /** 41 | * Display the specified resource. 42 | * 43 | * @param int $id 44 | * 45 | * @return \Illuminate\Http\Response 46 | */ 47 | public function show($id) 48 | { 49 | ${{crudNameSingular}} = {{modelName}}::findOrFail($id); 50 | 51 | return ${{crudNameSingular}}; 52 | } 53 | 54 | /** 55 | * Update the specified resource in storage. 56 | * 57 | * @param \Illuminate\Http\Request $request 58 | * @param int $id 59 | * 60 | * @return \Illuminate\Http\Response 61 | */ 62 | public function update(Request $request, $id) 63 | { 64 | {{validationRules}} 65 | ${{crudNameSingular}} = {{modelName}}::findOrFail($id); 66 | ${{crudNameSingular}}->update($request->all()); 67 | 68 | return response()->json(${{crudNameSingular}}, 200); 69 | } 70 | 71 | /** 72 | * Remove the specified resource from storage. 73 | * 74 | * @param int $id 75 | * 76 | * @return \Illuminate\Http\Response 77 | */ 78 | public function destroy($id) 79 | { 80 | {{modelName}}::destroy($id); 81 | 82 | return response()->json(null, 204); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | [ 31 | \App\Http\Middleware\EncryptCookies::class, 32 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 33 | \Illuminate\Session\Middleware\StartSession::class, 34 | // \Illuminate\Session\Middleware\AuthenticateSession::class, 35 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 36 | \App\Http\Middleware\VerifyCsrfToken::class, 37 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 38 | ], 39 | 40 | 'api' => [ 41 | 'throttle:60,1', 42 | 'bindings', 43 | ], 44 | ]; 45 | 46 | /** 47 | * The application's route middleware. 48 | * 49 | * These middleware may be assigned to groups or used individually. 50 | * 51 | * @var array 52 | */ 53 | protected $routeMiddleware = [ 54 | 'auth' => \Illuminate\Auth\Middleware\Authenticate::class, 55 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 56 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 57 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 58 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 59 | 'hakadmin' => \App\Http\Middleware\HakAdmin::class, 60 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 61 | ]; 62 | } 63 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DRIVER', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Default Cloud Filesystem Disk 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Many applications store files both locally and in the cloud. For this 24 | | reason, you may specify a default "cloud" driver here. This driver 25 | | will be bound as the Cloud disk implementation in the container. 26 | | 27 | */ 28 | 29 | 'cloud' => env('FILESYSTEM_CLOUD', 's3'), 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Filesystem Disks 34 | |-------------------------------------------------------------------------- 35 | | 36 | | Here you may configure as many filesystem "disks" as you wish, and you 37 | | may even configure multiple disks of the same driver. Defaults have 38 | | been setup for each driver as an example of the required options. 39 | | 40 | | Supported Drivers: "local", "ftp", "s3", "rackspace" 41 | | 42 | */ 43 | 44 | 'disks' => [ 45 | 46 | 'local' => [ 47 | 'driver' => 'local', 48 | 'root' => storage_path('app'), 49 | ], 50 | 51 | 'public' => [ 52 | 'driver' => 'local', 53 | 'root' => storage_path('app/public'), 54 | 'url' => env('APP_URL').'/storage', 55 | 'visibility' => 'public', 56 | ], 57 | 58 | 's3' => [ 59 | 'driver' => 's3', 60 | 'key' => env('AWS_ACCESS_KEY_ID'), 61 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 62 | 'region' => env('AWS_DEFAULT_REGION'), 63 | 'bucket' => env('AWS_BUCKET'), 64 | ], 65 | 66 | ], 67 | 68 | ]; 69 | -------------------------------------------------------------------------------- /resources/assets/js/pages/Surat.vue: -------------------------------------------------------------------------------- 1 | 47 | 48 | 53 | 54 | -------------------------------------------------------------------------------- /resources/views/jenis-surat/show.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 | @include('admin.sidebar') 7 | 8 |
9 |
10 |
JenisSurat {{ $jenissurat->id }}
11 |
12 | 13 | 14 | 15 | {!! Form::open([ 16 | 'method'=>'DELETE', 17 | 'url' => ['jenissurat', $jenissurat->id], 18 | 'style' => 'display:inline' 19 | ]) !!} 20 | {!! Form::button(' Delete', array( 21 | 'type' => 'submit', 22 | 'class' => 'btn btn-danger btn-xs', 23 | 'title' => 'Delete JenisSurat', 24 | 'onclick'=>'return confirm("Confirm delete?")' 25 | ))!!} 26 | {!! Form::close() !!} 27 |
28 |
29 | 30 |
31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 |
ID{{ $jenissurat->id }}
Name {{ $jenissurat->name }}
39 |
40 | 41 |
42 |
43 |
44 |
45 |
46 | @endsection 47 | -------------------------------------------------------------------------------- /resources/views/user/show.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 | @include('admin.sidebar') 7 | 8 |
9 |
10 |
User {{ $user->id }}
11 |
12 | 13 | 14 | 15 | {!! Form::open([ 16 | 'method'=>'DELETE', 17 | 'url' => ['user', $user->id], 18 | 'style' => 'display:inline' 19 | ]) !!} 20 | {!! Form::button(' Delete', array( 21 | 'type' => 'submit', 22 | 'class' => 'btn btn-danger btn-xs', 23 | 'title' => 'Delete User', 24 | 'onclick'=>'return confirm("Confirm delete?")' 25 | ))!!} 26 | {!! Form::close() !!} 27 |
28 |
29 | 30 |
31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 |
ID{{ $user->id }}
Name {{ $user->name }}
Username {{ $user->username }}
Password {{ $user->password }}
39 |
40 | 41 |
42 |
43 |
44 |
45 |
46 | @endsection 47 | -------------------------------------------------------------------------------- /resources/views/surat/show.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 | @include('admin.sidebar') 7 | 8 |
9 |
10 |
Surat {{ $surat->id }}
11 |
12 | 13 | 14 | 15 | {!! Form::open([ 16 | 'method'=>'DELETE', 17 | 'url' => ['surat', $surat->id], 18 | 'style' => 'display:inline' 19 | ]) !!} 20 | {!! Form::button(' Delete', array( 21 | 'type' => 'submit', 22 | 'class' => 'btn btn-danger btn-xs', 23 | 'title' => 'Delete Surat', 24 | 'onclick'=>'return confirm("Confirm delete?")' 25 | ))!!} 26 | {!! Form::close() !!} 27 |
28 |
29 | 30 |
31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 |
ID{{ $surat->id }}
No Surat {{ $surat->no_surat }}
No Agenda {{ $surat->no_agenda }}
Jenis Surat Id {{ $surat->jenis_surat_id }}
39 |
40 | 41 |
42 |
43 |
44 |
45 |
46 | @endsection 47 | -------------------------------------------------------------------------------- /resources/crud-generator/views/laravelcollective/show.blade.stub: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 | @include('admin.sidebar') 7 | 8 |
9 |
10 |
%%modelName%% {{ $%%crudNameSingular%%->%%primaryKey%% }}
11 |
12 | 13 | 14 | 15 | {!! Form::open([ 16 | 'method'=>'DELETE', 17 | 'url' => ['%%routeGroup%%%%crudName%%', $%%crudNameSingular%%->%%primaryKey%%], 18 | 'style' => 'display:inline' 19 | ]) !!} 20 | {!! Form::button(' Delete', array( 21 | 'type' => 'submit', 22 | 'class' => 'btn btn-danger btn-xs', 23 | 'title' => 'Delete %%modelName%%', 24 | 'onclick'=>'return confirm("Confirm delete?")' 25 | ))!!} 26 | {!! Form::close() !!} 27 |
28 |
29 | 30 |
31 | 32 | 33 | 34 | 35 | 36 | %%formBodyHtmlForShowView%% 37 | 38 |
ID{{ $%%crudNameSingular%%->%%primaryKey%% }}
39 |
40 | 41 |
42 |
43 |
44 |
45 |
46 | @endsection 47 | -------------------------------------------------------------------------------- /config/crudgenerator.php: -------------------------------------------------------------------------------- 1 | true, 6 | 7 | /* 8 | |-------------------------------------------------------------------------- 9 | | Crud Generator Template Stubs Storage Path 10 | |-------------------------------------------------------------------------- 11 | | 12 | | Here you can specify your custom template path for the generator. 13 | | 14 | */ 15 | 16 | 'path' => base_path('resources/crud-generator/'), 17 | 18 | /** 19 | * Columns number to show in view's table. 20 | */ 21 | 'view_columns_number' => 3, 22 | 23 | /** 24 | * Delimiter for template vars 25 | */ 26 | 'custom_delimiter' => ['%%', '%%'], 27 | 28 | /* 29 | |-------------------------------------------------------------------------- 30 | | Dynamic templating 31 | |-------------------------------------------------------------------------- 32 | | 33 | | Here you can specify your customs templates for the generator. 34 | | You can set new templates or delete some templates if you do not want them. 35 | | You can also choose which values are passed to the views and you can specify a custom delimiter for all templates 36 | | 37 | | Those values are available : 38 | | 39 | | formFields 40 | | formFieldsHtml 41 | | varName 42 | | crudName 43 | | crudNameCap 44 | | crudNameSingular 45 | | primaryKey 46 | | modelName 47 | | modelNameCap 48 | | viewName 49 | | routePrefix 50 | | routePrefixCap 51 | | routeGroup 52 | | formHeadingHtml 53 | | formBodyHtml 54 | | 55 | | 56 | */ 57 | 'dynamic_view_template' => [ 58 | 'index' => ['formHeadingHtml', 'formBodyHtml', 'crudName', 'crudNameCap', 'modelName', 'viewName', 'routeGroup', 'primaryKey'], 59 | 'form' => ['formFieldsHtml'], 60 | 'create' => ['crudName', 'crudNameCap', 'modelName', 'modelNameCap', 'viewName', 'routeGroup', 'viewTemplateDir'], 61 | 'edit' => ['crudName', 'crudNameSingular', 'crudNameCap', 'modelNameCap', 'modelName', 'viewName', 'routeGroup', 'primaryKey', 'viewTemplateDir'], 62 | 'show' => ['formHeadingHtml', 'formBodyHtml', 'formBodyHtmlForShowView', 'crudName', 'crudNameSingular', 'crudNameCap', 'modelName', 'viewName', 'routeGroup', 'primaryKey'], 63 | /* 64 | * Add new stubs templates here if you need to, like action, datatable... 65 | * custom_template needs to be activated for this to work 66 | */ 67 | ] 68 | 69 | 70 | ]; 71 | -------------------------------------------------------------------------------- /resources/views/auth/login.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Login
9 | 10 |
11 |
12 | {{ csrf_field() }} 13 | 14 |
15 | 16 | 17 |
18 | 19 | 20 | @if ($errors->has('email')) 21 | 22 | {{ $errors->first('email') }} 23 | 24 | @endif 25 |
26 |
27 | 28 |
29 | 30 | 31 |
32 | 33 | 34 | @if ($errors->has('password')) 35 | 36 | {{ $errors->first('password') }} 37 | 38 | @endif 39 |
40 |
41 | 42 |
43 |
44 | 47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | @endsection 56 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_DRIVER', 'sync'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Queue Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may configure the connection information for each server that 26 | | is used by your application. A default configuration has been added 27 | | for each back-end shipped with Laravel. You are free to add more. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => 'default', 41 | 'retry_after' => 90, 42 | ], 43 | 44 | 'beanstalkd' => [ 45 | 'driver' => 'beanstalkd', 46 | 'host' => 'localhost', 47 | 'queue' => 'default', 48 | 'retry_after' => 90, 49 | ], 50 | 51 | 'sqs' => [ 52 | 'driver' => 'sqs', 53 | 'key' => env('SQS_KEY', 'your-public-key'), 54 | 'secret' => env('SQS_SECRET', 'your-secret-key'), 55 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 56 | 'queue' => env('SQS_QUEUE', 'your-queue-name'), 57 | 'region' => env('SQS_REGION', 'us-east-1'), 58 | ], 59 | 60 | 'redis' => [ 61 | 'driver' => 'redis', 62 | 'connection' => 'default', 63 | 'queue' => 'default', 64 | 'retry_after' => 90, 65 | ], 66 | 67 | ], 68 | 69 | /* 70 | |-------------------------------------------------------------------------- 71 | | Failed Queue Jobs 72 | |-------------------------------------------------------------------------- 73 | | 74 | | These options configure the behavior of failed queue job logging so you 75 | | can control which database and table are used to store the jobs that 76 | | have failed. You may change them to any database / table you wish. 77 | | 78 | */ 79 | 80 | 'failed' => [ 81 | 'database' => env('DB_CONNECTION', 'mysql'), 82 | 'table' => 'failed_jobs', 83 | ], 84 | 85 | ]; 86 | -------------------------------------------------------------------------------- /resources/views/disposisi/form.blade.php: -------------------------------------------------------------------------------- 1 |
2 | {!! Form::label('no_disposisi', 'No Disposisi', ['class' => 'col-md-4 control-label']) !!} 3 |
4 | {!! Form::text('no_disposisi', null, ('' == 'required') ? ['class' => 'form-control', 'required' => 'required'] : ['class' => 'form-control']) !!} 5 | {!! $errors->first('no_disposisi', '

:message

') !!} 6 |
7 |
8 |
9 | {!! Form::label('no_agenda', 'No Agenda', ['class' => 'col-md-4 control-label']) !!} 10 |
11 | {!! Form::text('no_agenda', null, ('' == 'required') ? ['class' => 'form-control', 'required' => 'required'] : ['class' => 'form-control']) !!} 12 | {!! $errors->first('no_agenda', '

:message

') !!} 13 |
14 |
15 |
16 | {!! Form::label('surat_id', 'No Surat', ['class' => 'col-md-4 control-label']) !!} 17 |
18 | {!! Form::select('surat_id', $surats, null, ('' == 'required') ? ['class' => 'form-control', 'required' => 'required'] : ['class' => 'form-control']) !!} 19 | {!! $errors->first('surat_id', '

:message

') !!} 20 |
21 |
22 |
23 | {!! Form::label('kepada', 'Kepada', ['class' => 'col-md-4 control-label']) !!} 24 |
25 | {!! Form::text('kepada', null, ('' == 'required') ? ['class' => 'form-control', 'required' => 'required'] : ['class' => 'form-control']) !!} 26 | {!! $errors->first('kepada', '

:message

') !!} 27 |
28 |
29 |
30 | {!! Form::label('keterangan', 'Keterangan', ['class' => 'col-md-4 control-label']) !!} 31 |
32 | {!! Form::textarea('keterangan', null, ('' == 'required') ? ['class' => 'form-control', 'required' => 'required'] : ['class' => 'form-control']) !!} 33 | {!! $errors->first('keterangan', '

:message

') !!} 34 |
35 |
36 |
37 | {!! Form::label('tanggapan', 'Tanggapan', ['class' => 'col-md-4 control-label']) !!} 38 |
39 | {!! Form::text('tanggapan', null, ('' == 'required') ? ['class' => 'form-control', 'required' => 'required'] : ['class' => 'form-control']) !!} 40 | {!! $errors->first('tanggapan', '

:message

') !!} 41 |
42 |
43 |
44 |
45 | {!! Form::submit(isset($submitButtonText) ? $submitButtonText : 'Create', ['class' => 'btn btn-primary']) !!} 46 |
47 |
48 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Cache Stores 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the cache "stores" for your application as 26 | | well as their drivers. You may even define multiple stores for the 27 | | same cache driver to group types of items stored in your caches. 28 | | 29 | */ 30 | 31 | 'stores' => [ 32 | 33 | 'apc' => [ 34 | 'driver' => 'apc', 35 | ], 36 | 37 | 'array' => [ 38 | 'driver' => 'array', 39 | ], 40 | 41 | 'database' => [ 42 | 'driver' => 'database', 43 | 'table' => 'cache', 44 | 'connection' => null, 45 | ], 46 | 47 | 'file' => [ 48 | 'driver' => 'file', 49 | 'path' => storage_path('framework/cache/data'), 50 | ], 51 | 52 | 'memcached' => [ 53 | 'driver' => 'memcached', 54 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 55 | 'sasl' => [ 56 | env('MEMCACHED_USERNAME'), 57 | env('MEMCACHED_PASSWORD'), 58 | ], 59 | 'options' => [ 60 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 61 | ], 62 | 'servers' => [ 63 | [ 64 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 65 | 'port' => env('MEMCACHED_PORT', 11211), 66 | 'weight' => 100, 67 | ], 68 | ], 69 | ], 70 | 71 | 'redis' => [ 72 | 'driver' => 'redis', 73 | 'connection' => 'default', 74 | ], 75 | 76 | ], 77 | 78 | /* 79 | |-------------------------------------------------------------------------- 80 | | Cache Key Prefix 81 | |-------------------------------------------------------------------------- 82 | | 83 | | When utilizing a RAM based store such as APC or Memcached, there might 84 | | be other applications utilizing the same cache. So, we'll specify a 85 | | value to get prefixed to all our keys so we can avoid collisions. 86 | | 87 | */ 88 | 89 | 'prefix' => env( 90 | 'CACHE_PREFIX', 91 | str_slug(env('APP_NAME', 'laravel'), '_').'_cache' 92 | ), 93 | 94 | ]; 95 | -------------------------------------------------------------------------------- /app/Http/Controllers/JenisSuratController.php: -------------------------------------------------------------------------------- 1 | get('search'); 21 | $perPage = 25; 22 | 23 | if (!empty($keyword)) { 24 | $jenissurat = JenisSurat::where('name', 'LIKE', "%$keyword%") 25 | ->paginate($perPage); 26 | } else { 27 | $jenissurat = JenisSurat::paginate($perPage); 28 | } 29 | 30 | return view('jenis-surat.index', compact('jenissurat')); 31 | } 32 | 33 | /** 34 | * Show the form for creating a new resource. 35 | * 36 | * @return \Illuminate\View\View 37 | */ 38 | public function create() 39 | { 40 | return view('jenis-surat.create'); 41 | } 42 | 43 | /** 44 | * Store a newly created resource in storage. 45 | * 46 | * @param \Illuminate\Http\Request $request 47 | * 48 | * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector 49 | */ 50 | public function store(Request $request) 51 | { 52 | 53 | $requestData = $request->all(); 54 | 55 | JenisSurat::create($requestData); 56 | 57 | return redirect('jenis-surat')->with('flash_message', 'JenisSurat added!'); 58 | } 59 | 60 | /** 61 | * Display the specified resource. 62 | * 63 | * @param int $id 64 | * 65 | * @return \Illuminate\View\View 66 | */ 67 | public function show($id) 68 | { 69 | $jenissurat = JenisSurat::findOrFail($id); 70 | 71 | return view('jenis-surat.show', compact('jenissurat')); 72 | } 73 | 74 | /** 75 | * Show the form for editing the specified resource. 76 | * 77 | * @param int $id 78 | * 79 | * @return \Illuminate\View\View 80 | */ 81 | public function edit($id) 82 | { 83 | $jenissurat = JenisSurat::findOrFail($id); 84 | 85 | return view('jenis-surat.edit', compact('jenissurat')); 86 | } 87 | 88 | /** 89 | * Update the specified resource in storage. 90 | * 91 | * @param \Illuminate\Http\Request $request 92 | * @param int $id 93 | * 94 | * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector 95 | */ 96 | public function update(Request $request, $id) 97 | { 98 | 99 | $requestData = $request->all(); 100 | 101 | $jenissurat = JenisSurat::findOrFail($id); 102 | $jenissurat->update($requestData); 103 | 104 | return redirect('jenis-surat')->with('flash_message', 'JenisSurat updated!'); 105 | } 106 | 107 | /** 108 | * Remove the specified resource from storage. 109 | * 110 | * @param int $id 111 | * 112 | * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector 113 | */ 114 | public function destroy($id) 115 | { 116 | JenisSurat::destroy($id); 117 | 118 | return redirect('jenis-surat')->with('flash_message', 'JenisSurat deleted!'); 119 | } 120 | } -------------------------------------------------------------------------------- /resources/views/auth/passwords/reset.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Reset Password
9 | 10 |
11 |
12 | {{ csrf_field() }} 13 | 14 | 15 | 16 |
17 | 18 | 19 |
20 | 21 | 22 | @if ($errors->has('email')) 23 | 24 | {{ $errors->first('email') }} 25 | 26 | @endif 27 |
28 |
29 | 30 |
31 | 32 | 33 |
34 | 35 | 36 | @if ($errors->has('password')) 37 | 38 | {{ $errors->first('password') }} 39 | 40 | @endif 41 |
42 |
43 | 44 |
45 | 46 |
47 | 48 | 49 | @if ($errors->has('password_confirmation')) 50 | 51 | {{ $errors->first('password_confirmation') }} 52 | 53 | @endif 54 |
55 |
56 | 57 |
58 |
59 | 62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | @endsection 71 | -------------------------------------------------------------------------------- /resources/views/layouts/app.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | SIM SURAT 12 | 13 | 14 | 15 | 16 | @yield('styles') 17 | 18 | 19 |
20 | 74 | 75 | @yield('content') 76 |
77 | 78 | 79 | 80 | @yield('scripts') 81 | 82 | 83 | -------------------------------------------------------------------------------- /config/auth.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'guard' => 'web', 18 | 'passwords' => 'users', 19 | ], 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Authentication Guards 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Next, you may define every authentication guard for your application. 27 | | Of course, a great default configuration has been defined for you 28 | | here which uses session storage and the Eloquent user provider. 29 | | 30 | | All authentication drivers have a user provider. This defines how the 31 | | users are actually retrieved out of your database or other storage 32 | | mechanisms used by this application to persist your user's data. 33 | | 34 | | Supported: "session", "token" 35 | | 36 | */ 37 | 38 | 'guards' => [ 39 | 'web' => [ 40 | 'driver' => 'session', 41 | 'provider' => 'users', 42 | ], 43 | 44 | 'api' => [ 45 | 'driver' => 'token', 46 | 'provider' => 'users', 47 | ], 48 | ], 49 | 50 | /* 51 | |-------------------------------------------------------------------------- 52 | | User Providers 53 | |-------------------------------------------------------------------------- 54 | | 55 | | All authentication drivers have a user provider. This defines how the 56 | | users are actually retrieved out of your database or other storage 57 | | mechanisms used by this application to persist your user's data. 58 | | 59 | | If you have multiple user tables or models you may configure multiple 60 | | sources which represent each model / table. These sources may then 61 | | be assigned to any extra authentication guards you have defined. 62 | | 63 | | Supported: "database", "eloquent" 64 | | 65 | */ 66 | 67 | 'providers' => [ 68 | 'users' => [ 69 | 'driver' => 'eloquent', 70 | 'model' => App\User::class, 71 | ], 72 | 73 | // 'users' => [ 74 | // 'driver' => 'database', 75 | // 'table' => 'users', 76 | // ], 77 | ], 78 | 79 | /* 80 | |-------------------------------------------------------------------------- 81 | | Resetting Passwords 82 | |-------------------------------------------------------------------------- 83 | | 84 | | You may specify multiple password reset configurations if you have more 85 | | than one user table or model in the application and you want to have 86 | | separate password reset settings based on the specific user types. 87 | | 88 | | The expire time is the number of minutes that the reset token should be 89 | | considered valid. This security feature keeps tokens short-lived so 90 | | they have less time to be guessed. You may change this as needed. 91 | | 92 | */ 93 | 94 | 'passwords' => [ 95 | 'users' => [ 96 | 'provider' => 'users', 97 | 'table' => 'password_resets', 98 | 'expire' => 60, 99 | ], 100 | ], 101 | 102 | ]; 103 | -------------------------------------------------------------------------------- /resources/crud-generator/controller.stub: -------------------------------------------------------------------------------- 1 | get('search'); 21 | $perPage = {{pagination}}; 22 | 23 | if (!empty($keyword)) { 24 | ${{crudName}} = {{modelName}}::{{whereSnippet}}paginate($perPage); 25 | } else { 26 | ${{crudName}} = {{modelName}}::paginate($perPage); 27 | } 28 | 29 | return view('{{viewPath}}{{viewName}}.index', compact('{{crudName}}')); 30 | } 31 | 32 | /** 33 | * Show the form for creating a new resource. 34 | * 35 | * @return \Illuminate\View\View 36 | */ 37 | public function create() 38 | { 39 | return view('{{viewPath}}{{viewName}}.create'); 40 | } 41 | 42 | /** 43 | * Store a newly created resource in storage. 44 | * 45 | * @param \Illuminate\Http\Request $request 46 | * 47 | * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector 48 | */ 49 | public function store(Request $request) 50 | { 51 | {{validationRules}} 52 | $requestData = $request->all(); 53 | {{fileSnippet}} 54 | {{modelName}}::create($requestData); 55 | 56 | return redirect('{{routeGroup}}{{viewName}}')->with('flash_message', '{{modelName}} added!'); 57 | } 58 | 59 | /** 60 | * Display the specified resource. 61 | * 62 | * @param int $id 63 | * 64 | * @return \Illuminate\View\View 65 | */ 66 | public function show($id) 67 | { 68 | ${{crudNameSingular}} = {{modelName}}::findOrFail($id); 69 | 70 | return view('{{viewPath}}{{viewName}}.show', compact('{{crudNameSingular}}')); 71 | } 72 | 73 | /** 74 | * Show the form for editing the specified resource. 75 | * 76 | * @param int $id 77 | * 78 | * @return \Illuminate\View\View 79 | */ 80 | public function edit($id) 81 | { 82 | ${{crudNameSingular}} = {{modelName}}::findOrFail($id); 83 | 84 | return view('{{viewPath}}{{viewName}}.edit', compact('{{crudNameSingular}}')); 85 | } 86 | 87 | /** 88 | * Update the specified resource in storage. 89 | * 90 | * @param \Illuminate\Http\Request $request 91 | * @param int $id 92 | * 93 | * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector 94 | */ 95 | public function update(Request $request, $id) 96 | { 97 | {{validationRules}} 98 | $requestData = $request->all(); 99 | {{fileSnippet}} 100 | ${{crudNameSingular}} = {{modelName}}::findOrFail($id); 101 | ${{crudNameSingular}}->update($requestData); 102 | 103 | return redirect('{{routeGroup}}{{viewName}}')->with('flash_message', '{{modelName}} updated!'); 104 | } 105 | 106 | /** 107 | * Remove the specified resource from storage. 108 | * 109 | * @param int $id 110 | * 111 | * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector 112 | */ 113 | public function destroy($id) 114 | { 115 | {{modelName}}::destroy($id); 116 | 117 | return redirect('{{routeGroup}}{{viewName}}')->with('flash_message', '{{modelName}} deleted!'); 118 | } 119 | } -------------------------------------------------------------------------------- /resources/views/auth/register.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Register
9 | 10 |
11 |
12 | {{ csrf_field() }} 13 | 14 |
15 | 16 | 17 |
18 | 19 | 20 | @if ($errors->has('name')) 21 | 22 | {{ $errors->first('name') }} 23 | 24 | @endif 25 |
26 |
27 | 28 |
29 | 30 | 31 |
32 | 33 | 34 | @if ($errors->has('email')) 35 | 36 | {{ $errors->first('email') }} 37 | 38 | @endif 39 |
40 |
41 | 42 |
43 | 44 | 45 |
46 | 47 | 48 | @if ($errors->has('password')) 49 | 50 | {{ $errors->first('password') }} 51 | 52 | @endif 53 |
54 |
55 | 56 |
57 | 58 | 59 |
60 | 61 |
62 |
63 | 64 |
65 |
66 | 69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 | @endsection 78 | -------------------------------------------------------------------------------- /resources/crud-generator/views/html/index.blade.stub: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 | @include('admin.sidebar') 7 | 8 |
9 |
10 |
%%crudNameCap%%
11 |
12 | 13 | Add New 14 | 15 | 16 | 26 | 27 |
28 |
29 |
30 | 31 | 32 | 33 | %%formHeadingHtml%% 34 | 35 | 36 | 37 | @foreach($%%crudName%% as $item) 38 | 39 | 40 | %%formBodyHtml%% 41 | 51 | 52 | @endforeach 53 | 54 |
#Actions
{{ $loop->iteration or $item->%%primaryKey%% }} 42 | 43 | 44 | 45 |
46 | {{ method_field('DELETE') }} 47 | {{ csrf_field() }} 48 | 49 |
50 |
55 |
{!! $%%crudName%%->appends(['search' => Request::get('search')])->render() !!}
56 |
57 | 58 |
59 |
60 |
61 |
62 |
63 | @endsection 64 | -------------------------------------------------------------------------------- /resources/views/surat/form.blade.php: -------------------------------------------------------------------------------- 1 | @if(isset($submitButtonText)) 2 | {!! Form::hidden('tipe', null) !!} 3 |
4 | {!! Form::label('tipe', 'Tipe', ['class' => 'col-md-4 control-label']) !!} 5 |
6 | {!! Form::text('tipe', "Surat $surat->tipe" , ['disabled'=>'disabled','class'=>'form-control']) !!} 7 |
8 |
9 | @else 10 |
11 | {!! Form::label('tipe', 'Tipe', ['class' => 'col-md-4 control-label']) !!} 12 |
13 | {!! Form::select('tipe', ['masuk'=>'Surat masuk', 'keluar'=>'Surat keluar'], null, ('' == 'required') ? ['class' => 'form-control', 'required' => 'required'] : ['class' => 'form-control tipe']) !!} 14 | {!! $errors->first('tipe', '

:message

') !!} 15 |
16 |
17 | @endif 18 |
19 | {!! Form::label('no_surat', 'No Surat', ['class' => 'col-md-4 control-label']) !!} 20 |
21 | {!! Form::text('no_surat', null, ('' == 'required') ? ['class' => 'form-control', 'required' => 'required'] : ['class' => 'form-control']) !!} 22 | {!! $errors->first('no_surat', '

:message

') !!} 23 |
24 |
25 |
26 | {!! Form::label('jenis_surat_id', 'Jenis Surat', ['class' => 'col-md-4 control-label']) !!} 27 |
28 | {!! Form::select('jenis_surat_id', $jenisSurats, null, ('' == 'required') ? ['class' => 'form-control', 'required' => 'required'] : ['class' => 'form-control']) !!} 29 | 30 | {!! $errors->first('jenis_surat_id', '

:message

') !!} 31 |
32 |
33 |
34 | {!! Form::label('tanggal_kirim', 'Tanggal Kirim', ['class' => 'col-md-4 control-label']) !!} 35 |
36 | {!! Form::date('tanggal_kirim', null, ('' == 'required') ? ['class' => 'form-control', 'required' => 'required'] : ['class' => 'form-control']) !!} 37 | {!! $errors->first('tanggal_kirim', '

:message

') !!} 38 |
39 |
40 |
41 | {!! Form::label('tanggal_terima', 'Tanggal Terima', ['class' => 'col-md-4 control-label']) !!} 42 |
43 | {!! Form::date('tanggal_terima', null, ('' == 'required') ? ['class' => 'form-control', 'required' => 'required'] : ['class' => 'form-control']) !!} 44 | {!! $errors->first('tanggal_terima', '

:message

') !!} 45 |
46 |
47 |
48 | {!! Form::label('pengirim', 'Pengirim', ['class' => 'col-md-4 control-label']) !!} 49 |
50 | {!! Form::text('pengirim', null, ('' == 'required') ? ['class' => 'form-control', 'required' => 'required'] : ['class' => 'form-control']) !!} 51 | {!! $errors->first('pengirim', '

:message

') !!} 52 |
53 |
54 |
55 | {!! Form::label('perihal', 'Perihal', ['class' => 'col-md-4 control-label']) !!} 56 |
57 | {!! Form::text('perihal', null, ('' == 'required') ? ['class' => 'form-control', 'required' => 'required'] : ['class' => 'form-control']) !!} 58 | {!! $errors->first('perihal', '

:message

') !!} 59 |
60 |
61 | 62 |
63 |
64 | {!! Form::submit(isset($submitButtonText) ? $submitButtonText : 'Create', ['class' => 'btn btn-primary']) !!} 65 |
66 |
67 | -------------------------------------------------------------------------------- /app/Http/Controllers/UserController.php: -------------------------------------------------------------------------------- 1 | middleware('hakadmin'); 16 | } 17 | /** 18 | * Display a listing of the resource. 19 | * 20 | * @return \Illuminate\View\View 21 | */ 22 | public function index(Request $request) 23 | { 24 | 25 | $keyword = $request->get('search'); 26 | $perPage = 25; 27 | 28 | if (!empty($keyword)) { 29 | $user = User::paginate($perPage); 30 | } else { 31 | $user = User::paginate($perPage); 32 | } 33 | 34 | return view('user.index', compact('user')); 35 | } 36 | 37 | /** 38 | * Show the form for creating a new resource. 39 | * 40 | * @return \Illuminate\View\View 41 | */ 42 | public function create() 43 | { 44 | return view('user.create'); 45 | } 46 | 47 | /** 48 | * Store a newly created resource in storage. 49 | * 50 | * @param \Illuminate\Http\Request $request 51 | * 52 | * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector 53 | */ 54 | public function store(Request $request) 55 | { 56 | $request->validate([ 57 | 'name' => 'required', 58 | 'username' => 'required|unique:users', 59 | 'password' => 'required' 60 | ]); 61 | 62 | $requestData = [ 63 | 'name' => $request->name, 64 | 'username' => $request->username, 65 | 'password' => bcrypt($request->password) 66 | ]; 67 | 68 | User::create($requestData); 69 | 70 | return redirect('user')->with('flash_message', 'User added!'); 71 | } 72 | 73 | /** 74 | * Display the specified resource. 75 | * 76 | * @param int $id 77 | * 78 | * @return \Illuminate\View\View 79 | */ 80 | public function show($id) 81 | { 82 | $user = User::findOrFail($id); 83 | 84 | return view('user.show', compact('user')); 85 | } 86 | 87 | /** 88 | * Show the form for editing the specified resource. 89 | * 90 | * @param int $id 91 | * 92 | * @return \Illuminate\View\View 93 | */ 94 | public function edit($id) 95 | { 96 | $user = User::findOrFail($id); 97 | 98 | return view('user.edit', compact('user')); 99 | } 100 | 101 | /** 102 | * Update the specified resource in storage. 103 | * 104 | * @param \Illuminate\Http\Request $request 105 | * @param int $id 106 | * 107 | * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector 108 | */ 109 | public function update(Request $request, $id) 110 | { 111 | $user = User::findOrFail($id); 112 | $request->validate([ 113 | 'name' => 'required', 114 | 'username' => 'required|unique:users,username,'.$user->id, 115 | ]); 116 | 117 | $requestData = [ 118 | 'name' => $request->name, 119 | 'username' => $request->username 120 | ]; 121 | 122 | if (isset($request->password)) { 123 | $requestData = array_add($requestData, 'password', bcrypt($request->password)); 124 | } 125 | 126 | $user->update($requestData); 127 | 128 | return redirect('user')->with('flash_message', 'User updated!'); 129 | } 130 | 131 | /** 132 | * Remove the specified resource from storage. 133 | * 134 | * @param int $id 135 | * 136 | * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector 137 | */ 138 | public function destroy($id) 139 | { 140 | User::destroy($id); 141 | 142 | return redirect('user')->with('flash_message', 'User deleted!'); 143 | } 144 | } -------------------------------------------------------------------------------- /resources/views/jenis-surat/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 | @include('admin.sidebar') 7 | 8 |
9 |
10 |
Jenissurat
11 |
12 | 13 | Add New 14 | 15 | 16 | {!! Form::open(['method' => 'GET', 'url' => '/jenis-surat', 'class' => 'navbar-form navbar-right', 'role' => 'search']) !!} 17 |
18 | 19 | 20 | 23 | 24 |
25 | {!! Form::close() !!} 26 | 27 |
28 |
29 |
30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | @foreach($jenissurat as $item) 38 | 39 | 40 | 41 | 57 | 58 | @endforeach 59 | 60 |
#NameActions
{{ $loop->iteration or $item->id }}{{ $item->name }} 42 | 43 | 44 | {!! Form::open([ 45 | 'method'=>'DELETE', 46 | 'url' => ['/jenis-surat', $item->id], 47 | 'style' => 'display:inline' 48 | ]) !!} 49 | {!! Form::button(' Delete', array( 50 | 'type' => 'submit', 51 | 'class' => 'btn btn-danger btn-xs', 52 | 'title' => 'Delete JenisSurat', 53 | 'onclick'=>'return confirm("Confirm delete?")' 54 | )) !!} 55 | {!! Form::close() !!} 56 |
61 |
{!! $jenissurat->appends(['search' => Request::get('search')])->render() !!}
62 |
63 | 64 |
65 |
66 |
67 |
68 |
69 | @endsection 70 | -------------------------------------------------------------------------------- /resources/views/surat/laporan.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 | @include('admin.sidebar') 7 | 8 |
9 |
10 |
Laporan Surat Masuk/Keluar
11 |
12 | {!! Form::open(['url' => 'surat/laporan','method' => 'get','class' => 'form-inline']) !!} 13 |
14 | 15 | {!! Form::date('from', $from, ['class'=>'form-control input-sm']) !!} 16 |
17 |
18 | 19 | {!! Form::date('to', $to, ['class'=>'form-control input-sm']) !!} 20 |
21 |
22 | 23 | {!! Form::select('tipe', ['masuk' => 'Surat masuk', 'keluar' => 'Surat keluar'], $tipe, ['class' => 'form-control input-sm']) !!} 24 |
25 | 26 | 27 | 28 | {!! Form::close() !!} 29 |
30 |
31 |

LAPORAN SURAT {{ $tipe }}

32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | @if ($tipe=='masuk') 41 | 42 | @endif 43 | 44 | 45 | 46 | 47 | 48 | @foreach ($surats as $si => $s) 49 | 50 | 51 | 52 | 53 | 54 | 55 | @if ($tipe=='masuk') 56 | 57 | @endif 58 | 59 | 60 | 61 | @endforeach 62 | 63 |
NoNo. SuratNo. AgendaJenis SuratTanggal KirimTanggal TerimaPengirimPerihal
{{ $loop->iteration }}{{ $s->no_surat }}{{ $s->no_agenda }}{{ $s->jenis_surat->name }}{{ \Carbon\Carbon::parse($s->tanggal_kirim)->format('d/m/Y') }}{{ \Carbon\Carbon::parse($s->tanggal_terima)->format('d/m/Y') }}{{ $s->pengirim }}{{ $s->perihal }}
64 |
65 | 66 |
67 |
68 |
69 |
70 |
71 | @endsection 72 | 73 | @section('scripts') 74 | 81 | @endsection -------------------------------------------------------------------------------- /resources/views/user/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 | @include('admin.sidebar') 7 | 8 |
9 |
10 |
User
11 |
12 | 13 | Add New 14 | 15 | 16 | {!! Form::open(['method' => 'GET', 'url' => '/user', 'class' => 'navbar-form navbar-right', 'role' => 'search']) !!} 17 |
18 | 19 | 20 | 23 | 24 |
25 | {!! Form::close() !!} 26 | 27 |
28 |
29 |
30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | @foreach($user as $item) 42 | 43 | 44 | 45 | 46 | 47 | 62 | 63 | @endforeach 64 | 65 |
#NameUsernameHakActions
{{ $loop->iteration or $item->id }}{{ $item->name }}{{ $item->username }}{{ $item->hak }} 48 | 49 | {!! Form::open([ 50 | 'method'=>'DELETE', 51 | 'url' => ['/user', $item->id], 52 | 'style' => 'display:inline' 53 | ]) !!} 54 | {!! Form::button(' Delete', array( 55 | 'type' => 'submit', 56 | 'class' => 'btn btn-danger btn-xs', 57 | 'title' => 'Delete User', 58 | 'onclick'=>'return confirm("Confirm delete?")' 59 | )) !!} 60 | {!! Form::close() !!} 61 |
66 |
{!! $user->appends(['search' => Request::get('search')])->render() !!}
67 |
68 | 69 |
70 |
71 |
72 |
73 |
74 | @endsection 75 | -------------------------------------------------------------------------------- /resources/crud-generator/views/laravelcollective/index.blade.stub: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 | @include('admin.sidebar') 7 | 8 |
9 |
10 |
%%crudNameCap%%
11 |
12 | 13 | Add New 14 | 15 | 16 | {!! Form::open(['method' => 'GET', 'url' => '/%%routeGroup%%%%viewName%%', 'class' => 'navbar-form navbar-right', 'role' => 'search']) !!} 17 |
18 | 19 | 20 | 23 | 24 |
25 | {!! Form::close() !!} 26 | 27 |
28 |
29 |
30 | 31 | 32 | 33 | %%formHeadingHtml%% 34 | 35 | 36 | 37 | @foreach($%%crudName%% as $item) 38 | 39 | 40 | %%formBodyHtml%% 41 | 57 | 58 | @endforeach 59 | 60 |
#Actions
{{ $loop->iteration or $item->%%primaryKey%% }} 42 | 43 | 44 | {!! Form::open([ 45 | 'method'=>'DELETE', 46 | 'url' => ['/%%routeGroup%%%%viewName%%', $item->%%primaryKey%%], 47 | 'style' => 'display:inline' 48 | ]) !!} 49 | {!! Form::button(' Delete', array( 50 | 'type' => 'submit', 51 | 'class' => 'btn btn-danger btn-xs', 52 | 'title' => 'Delete %%modelName%%', 53 | 'onclick'=>'return confirm("Confirm delete?")' 54 | )) !!} 55 | {!! Form::close() !!} 56 |
61 |
{!! $%%crudName%%->appends(['search' => Request::get('search')])->render() !!}
62 |
63 | 64 |
65 |
66 |
67 |
68 |
69 | @endsection 70 | -------------------------------------------------------------------------------- /config/database.php: -------------------------------------------------------------------------------- 1 | env('DB_CONNECTION', 'mysql'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Database Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here are each of the database connections setup for your application. 24 | | Of course, examples of configuring each database platform that is 25 | | supported by Laravel is shown below to make development simple. 26 | | 27 | | 28 | | All database work in Laravel is done through the PHP PDO facilities 29 | | so make sure you have the driver for your particular database of 30 | | choice installed on your machine before you begin development. 31 | | 32 | */ 33 | 34 | 'connections' => [ 35 | 36 | 'sqlite' => [ 37 | 'driver' => 'sqlite', 38 | 'database' => env('DB_DATABASE', database_path('database.sqlite')), 39 | 'prefix' => '', 40 | ], 41 | 42 | 'mysql' => [ 43 | 'driver' => 'mysql', 44 | 'host' => env('DB_HOST', '127.0.0.1'), 45 | 'port' => env('DB_PORT', '3306'), 46 | 'database' => env('DB_DATABASE', 'forge'), 47 | 'username' => env('DB_USERNAME', 'forge'), 48 | 'password' => env('DB_PASSWORD', ''), 49 | 'unix_socket' => env('DB_SOCKET', ''), 50 | 'charset' => 'utf8mb4', 51 | 'collation' => 'utf8mb4_unicode_ci', 52 | 'prefix' => '', 53 | 'strict' => true, 54 | 'engine' => null, 55 | ], 56 | 57 | 'pgsql' => [ 58 | 'driver' => 'pgsql', 59 | 'host' => env('DB_HOST', '127.0.0.1'), 60 | 'port' => env('DB_PORT', '5432'), 61 | 'database' => env('DB_DATABASE', 'forge'), 62 | 'username' => env('DB_USERNAME', 'forge'), 63 | 'password' => env('DB_PASSWORD', ''), 64 | 'charset' => 'utf8', 65 | 'prefix' => '', 66 | 'schema' => 'public', 67 | 'sslmode' => 'prefer', 68 | ], 69 | 70 | 'sqlsrv' => [ 71 | 'driver' => 'sqlsrv', 72 | 'host' => env('DB_HOST', 'localhost'), 73 | 'port' => env('DB_PORT', '1433'), 74 | 'database' => env('DB_DATABASE', 'forge'), 75 | 'username' => env('DB_USERNAME', 'forge'), 76 | 'password' => env('DB_PASSWORD', ''), 77 | 'charset' => 'utf8', 78 | 'prefix' => '', 79 | ], 80 | 81 | ], 82 | 83 | /* 84 | |-------------------------------------------------------------------------- 85 | | Migration Repository Table 86 | |-------------------------------------------------------------------------- 87 | | 88 | | This table keeps track of all the migrations that have already run for 89 | | your application. Using this information, we can determine which of 90 | | the migrations on disk haven't actually been run in the database. 91 | | 92 | */ 93 | 94 | 'migrations' => 'migrations', 95 | 96 | /* 97 | |-------------------------------------------------------------------------- 98 | | Redis Databases 99 | |-------------------------------------------------------------------------- 100 | | 101 | | Redis is an open source, fast, and advanced key-value store that also 102 | | provides a richer set of commands than a typical key-value systems 103 | | such as APC or Memcached. Laravel makes it easy to dig right in. 104 | | 105 | */ 106 | 107 | 'redis' => [ 108 | 109 | 'client' => 'predis', 110 | 111 | 'default' => [ 112 | 'host' => env('REDIS_HOST', '127.0.0.1'), 113 | 'password' => env('REDIS_PASSWORD', null), 114 | 'port' => env('REDIS_PORT', 6379), 115 | 'database' => 0, 116 | ], 117 | 118 | ], 119 | 120 | ]; 121 | -------------------------------------------------------------------------------- /resources/views/welcome.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | SIM SURAT 9 | 10 | 11 | 12 | 13 | {!! Html::style('css/custom.css') !!} 14 | 15 | 89 | 90 | 91 |
92 | @if (Route::has('login')) 93 | 110 | @endif 111 | 112 |
113 |
114 | SIM SURAT 115 |
116 |

Sistem Manajemen Surat

117 | 118 | 136 |
137 |
138 | 139 | 140 | -------------------------------------------------------------------------------- /app/Http/Controllers/DisposisiController.php: -------------------------------------------------------------------------------- 1 | get('search'); 22 | $surats = Surat::count(); 23 | $perPage = 25; 24 | 25 | if (!empty($keyword)) { 26 | $disposisi = Disposisi::where('no_disposisi', 'LIKE', "%$keyword%") 27 | ->orWhere('no_agenda', 'LIKE', "%$keyword%") 28 | ->orWhere('surat_id', 'LIKE', "%$keyword%") 29 | ->orWhere('kepada', 'LIKE', "%$keyword%") 30 | ->orWhere('keterangan', 'LIKE', "%$keyword%") 31 | ->orWhere('tanggapan', 'LIKE', "%$keyword%") 32 | ->orWhere('user_id', 'LIKE', "%$keyword%") 33 | ->paginate($perPage); 34 | } else { 35 | $disposisi = Disposisi::paginate($perPage); 36 | } 37 | 38 | return view('disposisi.index', compact('disposisi','surats')); 39 | } 40 | 41 | /** 42 | * Show the form for creating a new resource. 43 | * 44 | * @return \Illuminate\View\View 45 | */ 46 | public function create() 47 | { 48 | $surats = $this->surats(); 49 | return view('disposisi.create', compact('surats')); 50 | } 51 | 52 | /** 53 | * Store a newly created resource in storage. 54 | * 55 | * @param \Illuminate\Http\Request $request 56 | * 57 | * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector 58 | */ 59 | public function store(Request $request) 60 | { 61 | $request->validate([ 62 | 'no_disposisi' => 'required', 63 | 'no_agenda' => 'required', 64 | 'surat_id' => 'required', 65 | 'kepada' => 'required', 66 | 'keterangan' => 'required', 67 | 'tanggapan' => 'required', 68 | ]); 69 | $requestData = array_add($request->all(), 'user_id', $request->user()->id); 70 | 71 | Disposisi::create($requestData); 72 | 73 | return redirect('disposisi')->with('flash_message', 'Disposisi added!'); 74 | } 75 | 76 | /** 77 | * Display the specified resource. 78 | * 79 | * @param int $id 80 | * 81 | * @return \Illuminate\View\View 82 | */ 83 | public function show($id) 84 | { 85 | $disposisi = Disposisi::findOrFail($id); 86 | 87 | return view('disposisi.show', compact('disposisi')); 88 | } 89 | 90 | /** 91 | * Show the form for editing the specified resource. 92 | * 93 | * @param int $id 94 | * 95 | * @return \Illuminate\View\View 96 | */ 97 | public function edit($id) 98 | { 99 | $surats = $this->surats(); 100 | $disposisi = Disposisi::findOrFail($id); 101 | 102 | return view('disposisi.edit', compact('disposisi','surats')); 103 | } 104 | 105 | /** 106 | * Update the specified resource in storage. 107 | * 108 | * @param \Illuminate\Http\Request $request 109 | * @param int $id 110 | * 111 | * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector 112 | */ 113 | public function update(Request $request, $id) 114 | { 115 | $request->validate([ 116 | 'no_disposisi' => 'required', 117 | 'no_agenda' => 'required', 118 | 'surat_id' => 'required', 119 | 'kepada' => 'required', 120 | 'keterangan' => 'required', 121 | 'tanggapan' => 'required', 122 | ]); 123 | $requestData = $request->all(); 124 | 125 | $disposisi = Disposisi::findOrFail($id); 126 | $disposisi->update($requestData); 127 | 128 | return redirect('disposisi')->with('flash_message', 'Disposisi updated!'); 129 | } 130 | 131 | /** 132 | * Remove the specified resource from storage. 133 | * 134 | * @param int $id 135 | * 136 | * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector 137 | */ 138 | public function destroy($id) 139 | { 140 | Disposisi::destroy($id); 141 | 142 | return redirect('disposisi')->with('flash_message', 'Disposisi deleted!'); 143 | } 144 | 145 | private function surats () 146 | { 147 | return Surat::whereTipe('masuk')->pluck('no_surat','id'); 148 | } 149 | } -------------------------------------------------------------------------------- /config/mail.php: -------------------------------------------------------------------------------- 1 | env('MAIL_DRIVER', 'smtp'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | SMTP Host Address 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may provide the host address of the SMTP server used by your 27 | | applications. A default option is provided that is compatible with 28 | | the Mailgun mail service which will provide reliable deliveries. 29 | | 30 | */ 31 | 32 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 33 | 34 | /* 35 | |-------------------------------------------------------------------------- 36 | | SMTP Host Port 37 | |-------------------------------------------------------------------------- 38 | | 39 | | This is the SMTP port used by your application to deliver e-mails to 40 | | users of the application. Like the host we have set this value to 41 | | stay compatible with the Mailgun e-mail application by default. 42 | | 43 | */ 44 | 45 | 'port' => env('MAIL_PORT', 587), 46 | 47 | /* 48 | |-------------------------------------------------------------------------- 49 | | Global "From" Address 50 | |-------------------------------------------------------------------------- 51 | | 52 | | You may wish for all e-mails sent by your application to be sent from 53 | | the same address. Here, you may specify a name and address that is 54 | | used globally for all e-mails that are sent by your application. 55 | | 56 | */ 57 | 58 | 'from' => [ 59 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 60 | 'name' => env('MAIL_FROM_NAME', 'Example'), 61 | ], 62 | 63 | /* 64 | |-------------------------------------------------------------------------- 65 | | E-Mail Encryption Protocol 66 | |-------------------------------------------------------------------------- 67 | | 68 | | Here you may specify the encryption protocol that should be used when 69 | | the application send e-mail messages. A sensible default using the 70 | | transport layer security protocol should provide great security. 71 | | 72 | */ 73 | 74 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 75 | 76 | /* 77 | |-------------------------------------------------------------------------- 78 | | SMTP Server Username 79 | |-------------------------------------------------------------------------- 80 | | 81 | | If your SMTP server requires a username for authentication, you should 82 | | set it here. This will get used to authenticate with your server on 83 | | connection. You may also set the "password" value below this one. 84 | | 85 | */ 86 | 87 | 'username' => env('MAIL_USERNAME'), 88 | 89 | 'password' => env('MAIL_PASSWORD'), 90 | 91 | /* 92 | |-------------------------------------------------------------------------- 93 | | Sendmail System Path 94 | |-------------------------------------------------------------------------- 95 | | 96 | | When using the "sendmail" driver to send e-mails, we will need to know 97 | | the path to where Sendmail lives on this server. A default path has 98 | | been provided here, which will work well on most of your systems. 99 | | 100 | */ 101 | 102 | 'sendmail' => '/usr/sbin/sendmail -bs', 103 | 104 | /* 105 | |-------------------------------------------------------------------------- 106 | | Markdown Mail Settings 107 | |-------------------------------------------------------------------------- 108 | | 109 | | If you are using Markdown based email rendering, you may configure your 110 | | theme and component paths here, allowing you to customize the design 111 | | of the emails. Or, you may simply stick with the Laravel defaults! 112 | | 113 | */ 114 | 115 | 'markdown' => [ 116 | 'theme' => 'default', 117 | 118 | 'paths' => [ 119 | resource_path('views/vendor/mail'), 120 | ], 121 | ], 122 | 123 | ]; 124 | -------------------------------------------------------------------------------- /resources/views/disposisi/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 | @include('admin.sidebar') 7 | 8 |
9 |
10 |
Disposisi
11 |
12 | @if ($surats>0) 13 | 14 | Add New 15 | 16 | 17 | {!! Form::open(['method' => 'GET', 'url' => '/disposisi', 'class' => 'navbar-form navbar-right', 'role' => 'search']) !!} 18 |
19 | 20 | 21 | 24 | 25 |
26 | {!! Form::close() !!} 27 | 28 |
29 |
30 |
31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | @foreach($disposisi as $item) 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 63 | 64 | @endforeach 65 | 66 |
#No DisposisiNo AgendaNo. SuratKepadaKeteranganTanggapanActions
{{ $loop->iteration or $item->id }}{{ $item->no_disposisi }}{{ $item->no_agenda }}{{ $item->surat->no_surat }}{{ $item->kepada }}{{ $item->keterangan }}{{ $item->tanggapan }} 48 | 49 | 50 | {!! Form::open([ 51 | 'method'=>'DELETE', 52 | 'url' => ['/disposisi', $item->id], 53 | 'style' => 'display:inline' 54 | ]) !!} 55 | {!! Form::button(' Delete', array( 56 | 'type' => 'submit', 57 | 'class' => 'btn btn-danger btn-xs', 58 | 'title' => 'Delete Disposisi', 59 | 'onclick'=>'return confirm("Confirm delete?")' 60 | )) !!} 61 | {!! Form::close() !!} 62 |
67 |
{!! $disposisi->appends(['search' => Request::get('search')])->render() !!}
68 |
69 | @else 70 |

Belum ada surat masuk

71 | @endif 72 |
73 |
74 |
75 |
76 |
77 | @endsection 78 | -------------------------------------------------------------------------------- /resources/views/surat/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 | @include('admin.sidebar') 7 | 8 |
9 |
10 |
Surat
11 |
12 | 13 | Add New 14 | 15 | 16 | {!! Form::open(['method' => 'GET', 'url' => '/surat', 'class' => 'navbar-form navbar-right', 'role' => 'search']) !!} 17 |
18 | 19 | 20 | 23 | 24 |
25 | {!! Form::close() !!} 26 | 27 |
28 |
29 |
30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | @foreach($surat as $item) 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 72 | 73 | @endforeach 74 | 75 |
#No SuratNo AgendaJenis SuratTanggal KirimTanggal TerimaPengirimPerihalTipeActions
{{ $loop->iteration or $item->id }}{{ $item->no_surat }}{{ $item->no_agenda }}{{ $item->jenis_surat->name }}{{ $item->tanggal_kirim }}{{ $item->tanggal_terima }}{{ $item->pengirim }}{{ $item->perihal }}Surat {{ $item->tipe }} 58 | 59 | {!! Form::open([ 60 | 'method'=>'DELETE', 61 | 'url' => ['/surat', $item->id], 62 | 'style' => 'display:inline' 63 | ]) !!} 64 | {!! Form::button(' Delete', array( 65 | 'type' => 'submit', 66 | 'class' => 'btn btn-danger btn-xs', 67 | 'title' => 'Delete Surat', 68 | 'onclick'=>'return confirm("Confirm delete?")' 69 | )) !!} 70 | {!! Form::close() !!} 71 |
76 |
{!! $surat->appends(['search' => Request::get('search')])->render() !!}
77 |
78 | 79 |
80 |
81 |
82 |
83 |
84 | @endsection 85 | --------------------------------------------------------------------------------