├── public ├── favicon.ico ├── robots.txt ├── .htaccess ├── css │ └── front.css ├── web.config └── index.php ├── database ├── .gitignore ├── seeds │ └── DatabaseSeeder.php ├── migrations │ ├── 2017_02_07_184642_create_categories_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2017_02_07_190444_create_comments_table.php │ ├── 2014_10_12_000000_create_users_table.php │ └── 2017_02_07_184551_create_tickets_table.php └── factories │ └── ModelFactory.php ├── bootstrap ├── cache │ └── .gitignore ├── autoload.php └── app.php ├── storage ├── logs │ └── .gitignore ├── app │ ├── public │ │ └── .gitignore │ └── .gitignore └── framework │ ├── cache │ └── .gitignore │ ├── views │ └── .gitignore │ ├── sessions │ └── .gitignore │ └── .gitignore ├── renovate.json ├── .gitattributes ├── .gitignore ├── resources ├── views │ ├── includes │ │ └── flash.blade.php │ ├── auth │ │ ├── passwords │ │ │ ├── email.blade.php │ │ │ └── reset.blade.php │ │ ├── login.blade.php │ │ └── register.blade.php │ ├── home.blade.php │ ├── admin │ │ ├── categories.blade.php │ │ ├── admins.blade.php │ │ └── dashboard.blade.php │ ├── tickets │ │ ├── user_tickets.blade.php │ │ ├── show.blade.php │ │ ├── index.blade.php │ │ └── create.blade.php │ ├── layouts │ │ └── app.blade.php │ └── mail │ │ ├── ticket_info.blade.php │ │ ├── ticket_comments.blade.php │ │ └── ticket_status.blade.php ├── assets │ ├── sass │ │ ├── app.scss │ │ └── _variables.scss │ └── js │ │ ├── app.js │ │ ├── components │ │ └── Example.vue │ │ └── bootstrap.js └── lang │ └── en │ ├── pagination.php │ ├── auth.php │ ├── passwords.php │ └── validation.php ├── tests ├── TestCase.php ├── Unit │ └── ExampleTest.php ├── Feature │ └── ExampleTest.php └── CreatesApplication.php ├── app ├── Http │ ├── Controllers │ │ ├── HomeController.php │ │ ├── Controller.php │ │ ├── Auth │ │ │ ├── ForgotPasswordController.php │ │ │ ├── LoginController.php │ │ │ ├── ResetPasswordController.php │ │ │ └── RegisterController.php │ │ ├── Admin │ │ │ ├── AdminsController.php │ │ │ ├── CategoryController.php │ │ │ ├── TicketsController.php │ │ │ └── DashboardController.php │ │ ├── CommentsController.php │ │ └── TicketsController.php │ ├── Middleware │ │ ├── EncryptCookies.php │ │ ├── VerifyCsrfToken.php │ │ ├── TrimStrings.php │ │ ├── AdminMiddleware.php │ │ ├── NotAdminMiddleware.php │ │ └── RedirectIfAuthenticated.php │ └── Kernel.php ├── Category.php ├── Comment.php ├── Providers │ ├── BroadcastServiceProvider.php │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── Ticket.php ├── User.php ├── Mail │ ├── StatusChanged.php │ ├── TicketCreated.php │ └── TicketCommented.php ├── Console │ └── Kernel.php ├── Traits │ └── BBCodeTrait.php └── Exceptions │ └── Handler.php ├── routes ├── channels.php ├── api.php ├── console.php └── web.php ├── server.php ├── webpack.mix.js ├── .env.example ├── package.json ├── config ├── services.php ├── view.php ├── broadcasting.php ├── filesystems.php ├── queue.php ├── cache.php ├── auth.php ├── database.php ├── mail.php ├── session.php └── app.php ├── phpunit.xml ├── composer.json ├── artisan └── readme.md /public/favicon.ico: -------------------------------------------------------------------------------- 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/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "config:base" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /public/storage 3 | /public/hot 4 | /storage/*.key 5 | /vendor 6 | /.idea 7 | Homestead.json 8 | Homestead.yaml 9 | .env 10 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | config.php 2 | routes.php 3 | schedule-* 4 | compiled.php 5 | services.json 6 | events.scanned.php 7 | routes.scanned.php 8 | down 9 | -------------------------------------------------------------------------------- /resources/views/includes/flash.blade.php: -------------------------------------------------------------------------------- 1 | @if (session('status')) 2 |
3 | {{ session('status') }} 4 |
5 | @endif 6 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | call(UsersTableSeeder::class); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Category.php: -------------------------------------------------------------------------------- 1 | hasMany(Ticket::class); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /tests/Unit/ExampleTest.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 17 | 18 | $response->assertStatus(200); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | belongsTo(Ticket::class); 16 | } 17 | 18 | public function user() 19 | { 20 | return $this->belongsTo(User::class); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 16 | }); 17 | -------------------------------------------------------------------------------- /app/Http/Middleware/AdminMiddleware.php: -------------------------------------------------------------------------------- 1 | is_admin) { 21 | return redirect('/'); 22 | } 23 | 24 | return $next($request); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 17 | return $request->user(); 18 | }); 19 | -------------------------------------------------------------------------------- /app/Ticket.php: -------------------------------------------------------------------------------- 1 | belongsTo(Category::class); 16 | } 17 | 18 | public function comments() 19 | { 20 | return $this->hasMany(Comment::class); 21 | } 22 | 23 | public function user() 24 | { 25 | return $this->belongsTo(User::class); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /server.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $uri = urldecode( 9 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 10 | ); 11 | 12 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 13 | // built-in PHP web server. This provides a convenient way to test a Laravel 14 | // application without having installed a "real" web server software here. 15 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 16 | return false; 17 | } 18 | 19 | require_once __DIR__.'/public/index.php'; 20 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | const { 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 15 | .js("resources/assets/js/app.js", "public/js") 16 | .sass("resources/assets/sass/app.scss", "public/css"); 17 | -------------------------------------------------------------------------------- /app/Http/Middleware/NotAdminMiddleware.php: -------------------------------------------------------------------------------- 1 | is_admin) { 21 | return redirect('admin'.$request->server()['REQUEST_URI']); 22 | } 23 | 24 | return $next($request); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 18 | })->describe('Display an inspiring quote'); 19 | -------------------------------------------------------------------------------- /bootstrap/autoload.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_ENV=local 2 | APP_KEY= 3 | APP_DEBUG=true 4 | APP_LOG_LEVEL=debug 5 | APP_URL=http://localhost 6 | 7 | DB_CONNECTION=mysql 8 | DB_HOST=127.0.0.1 9 | DB_PORT=3306 10 | DB_DATABASE=homestead 11 | DB_USERNAME=homestead 12 | DB_PASSWORD=secret 13 | 14 | BROADCAST_DRIVER=log 15 | CACHE_DRIVER=file 16 | SESSION_DRIVER=file 17 | QUEUE_DRIVER=sync 18 | 19 | REDIS_HOST=127.0.0.1 20 | REDIS_PASSWORD=null 21 | REDIS_PORT=6379 22 | 23 | MAIL_DRIVER=smtp 24 | MAIL_HOST=mailtrap.io 25 | MAIL_PORT=2525 26 | MAIL_USERNAME=null 27 | MAIL_PASSWORD=null 28 | MAIL_ENCRYPTION=null 29 | 30 | PUSHER_APP_ID= 31 | PUSHER_APP_KEY= 32 | PUSHER_APP_SECRET= 33 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Redirect Trailing Slashes If Not A Folder... 9 | RewriteCond %{REQUEST_FILENAME} !-d 10 | RewriteRule ^(.*)/$ /$1 [L,R=301] 11 | 12 | # Handle Front Controller... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_FILENAME} !-f 15 | RewriteRule ^ index.php [L] 16 | 17 | # Handle Authorization Header 18 | RewriteCond %{HTTP:Authorization} . 19 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 20 | 21 | -------------------------------------------------------------------------------- /resources/assets/js/app.js: -------------------------------------------------------------------------------- 1 | /** 2 | * First we will load all of this project's JavaScript dependencies which 3 | * includes Vue and other libraries. It is a great starting point when 4 | * building robust, powerful web applications using Vue and Laravel. 5 | */ 6 | 7 | require("./bootstrap"); 8 | 9 | /** 10 | * Next, we will create a fresh Vue application instance and attach it to 11 | * the page. Then, you may begin adding components to this application 12 | * or customize the JavaScript scaffolding to fit your unique needs. 13 | */ 14 | 15 | Vue.component("example", require("./components/Example.vue")); 16 | 17 | const app = new Vue({ 18 | el: "#app" 19 | }); 20 | -------------------------------------------------------------------------------- /app/Providers/AuthServiceProvider.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 16 | ]; 17 | 18 | /** 19 | * Register any authentication / authorization services. 20 | * 21 | * @return void 22 | */ 23 | public function boot() 24 | { 25 | $this->registerPolicies(); 26 | 27 | // 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /resources/assets/js/components/Example.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 24 | -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | check()) { 22 | return redirect('/'); 23 | } 24 | 25 | return $next($request); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /database/migrations/2017_02_07_184642_create_categories_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name'); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | Schema::dropIfExists('categories'); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/User.php: -------------------------------------------------------------------------------- 1 | hasMany(Comment::class); 33 | } 34 | 35 | public function tickets() 36 | { 37 | return $this->hasMany(Ticket::class); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token')->index(); 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 | -------------------------------------------------------------------------------- /database/factories/ModelFactory.php: -------------------------------------------------------------------------------- 1 | define(App\User::class, function (Faker\Generator $faker) { 16 | static $password; 17 | 18 | return [ 19 | 'name' => $faker->name, 20 | 'email' => $faker->unique()->safeEmail, 21 | 'password' => $password ?: $password = bcrypt('secret'), 22 | 'remember_token' => str_random(10), 23 | ]; 24 | }); 25 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /public/css/front.css: -------------------------------------------------------------------------------- 1 | html, body { 2 | background-color: #fff; 3 | color: #636b6f; 4 | font-family: 'Raleway', sans-serif; 5 | font-weight: 100; 6 | height: 100vh; 7 | margin: 0; 8 | } 9 | 10 | .full-height { 11 | height: 100vh; 12 | } 13 | 14 | .flex-center { 15 | align-items: center; 16 | display: flex; 17 | justify-content: center; 18 | } 19 | 20 | .position-ref { 21 | position: relative; 22 | } 23 | 24 | .top-right { 25 | position: absolute; 26 | right: 10px; 27 | top: 18px; 28 | } 29 | 30 | .content { 31 | text-align: center; 32 | } 33 | 34 | .title { 35 | font-size: 84px; 36 | } 37 | 38 | .links > a { 39 | color: #636b6f; 40 | padding: 0 25px; 41 | font-size: 12px; 42 | font-weight: 600; 43 | letter-spacing: .1rem; 44 | text-decoration: none; 45 | text-transform: uppercase; 46 | } 47 | 48 | .m-b-md { 49 | margin-bottom: 30px; 50 | } 51 | -------------------------------------------------------------------------------- /database/migrations/2017_02_07_190444_create_comments_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->integer('ticket_id')->unsigned(); 19 | $table->integer('user_id')->unsigned(); 20 | $table->text('comment'); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::dropIfExists('comments'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/Mail/StatusChanged.php: -------------------------------------------------------------------------------- 1 | user = $user; 26 | $this->ticket = $ticket; 27 | } 28 | 29 | /** 30 | * Build the message. 31 | * 32 | * @return $this 33 | */ 34 | public function build() 35 | { 36 | return $this->view('mail.ticket_status') 37 | ->with([ 38 | 'ticket' => $this->ticket, 39 | 'user' => $this->user, 40 | ]); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/Mail/TicketCreated.php: -------------------------------------------------------------------------------- 1 | user = $user; 26 | $this->ticket = $ticket; 27 | } 28 | 29 | /** 30 | * Build the message. 31 | * 32 | * @return $this 33 | */ 34 | public function build() 35 | { 36 | return $this->view('mail.ticket_info') 37 | ->with([ 38 | 'ticket' => $this->ticket, 39 | 'user' => $this->user, 40 | ]); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name'); 19 | $table->string('email')->unique(); 20 | $table->string('password'); 21 | $table->boolean('is_admin')->default(false); 22 | $table->rememberToken(); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('users'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /public/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire') 29 | // ->hourly(); 30 | } 31 | 32 | /** 33 | * Register the Closure based commands for the application. 34 | * 35 | * @return void 36 | */ 37 | protected function commands() 38 | { 39 | require base_path('routes/console.php'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ForgotPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "node node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 5 | "watch": "node node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 6 | "hot": "node node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", 7 | "production": "node node_modules/cross-env/bin/cross-env.js NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" 8 | }, 9 | "devDependencies": { 10 | "axios": "0.18.0", 11 | "bootstrap-sass": "3.3.7", 12 | "jquery": "3.3.1", 13 | "laravel-mix": "2.0.0", 14 | "lodash": "4.17.5", 15 | "vue": "2.5.14" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/AdminsController.php: -------------------------------------------------------------------------------- 1 | middleware('admin'); 14 | } 15 | 16 | public function show() 17 | { 18 | $administrators = User::where('is_admin', true)->get(); 19 | $users = User::where('is_admin', false)->get(); 20 | 21 | return view('admin.admins', compact('administrators', 'users')); 22 | } 23 | 24 | public function add(Request $request) 25 | { 26 | $this->validate($request, [ 27 | 'user_id' => 'required|exists:users,id', 28 | ]); 29 | User::find($request->input('user_id'))->update(['is_admin' => true]); 30 | 31 | return redirect()->back(); 32 | } 33 | 34 | public function delete($user_id) 35 | { 36 | $user = User::findOrFail($user_id)->update(['is_admin' => false]); 37 | 38 | return redirect()->back(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /database/migrations/2017_02_07_184551_create_tickets_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->integer('user_id')->unsigned(); 19 | $table->integer('category_id')->unsigned(); 20 | $table->string('ticket_id')->unique(); 21 | $table->string('title'); 22 | $table->string('priority'); 23 | $table->text('message'); 24 | $table->string('status')->default('Open'); 25 | $table->timestamps(); 26 | }); 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() 35 | { 36 | Schema::dropIfExists('tickets'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/LoginController.php: -------------------------------------------------------------------------------- 1 | middleware('guest', ['except' => 'logout']); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ResetPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /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/Admin/CategoryController.php: -------------------------------------------------------------------------------- 1 | middleware('admin'); 14 | } 15 | 16 | public function show() 17 | { 18 | $categories = Category::all(); 19 | 20 | return view('admin.categories', compact('categories')); 21 | } 22 | 23 | public function add(Request $request) 24 | { 25 | $this->validate($request, [ 26 | 'name' => 'required|unique:categories,name', 27 | ]); 28 | Category::create([ 29 | 'name' => $request->name, 30 | ]); 31 | 32 | return redirect()->back(); 33 | } 34 | 35 | public function delete($category_id) 36 | { 37 | $category = Category::findOrFail($category_id); 38 | foreach ($category->tickets as $ticket) { 39 | $ticket->delete(); 40 | } 41 | $category->delete(); 42 | 43 | return redirect()->back(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | realpath(base_path('resources/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 | -------------------------------------------------------------------------------- /app/Mail/TicketCommented.php: -------------------------------------------------------------------------------- 1 | user = $user; 28 | $this->ticket = $ticket; 29 | $this->comment = $comment; 30 | } 31 | 32 | /** 33 | * Build the message. 34 | * 35 | * @return $this 36 | */ 37 | public function build() 38 | { 39 | return $this->view('mail.ticket_comments') 40 | ->with([ 41 | 'ticket' => $this->ticket, 42 | 'user' => $this->user, 43 | 'comment' => $this->comment, 44 | ]); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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": ">=5.6.4", 9 | "laravel/framework": "5.4.*", 10 | "laravel/tinker": "~1.0" 11 | }, 12 | "require-dev": { 13 | "fzaninotto/faker": "~1.4", 14 | "mockery/mockery": "0.9.*", 15 | "phpunit/phpunit": "~5.7" 16 | }, 17 | "autoload": { 18 | "classmap": [ 19 | "database" 20 | ], 21 | "psr-4": { 22 | "App\\": "app/" 23 | } 24 | }, 25 | "autoload-dev": { 26 | "psr-4": { 27 | "Tests\\": "tests/" 28 | } 29 | }, 30 | "scripts": { 31 | "post-root-package-install": [ 32 | "php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 33 | ], 34 | "post-create-project-cmd": [ 35 | "php artisan key:generate" 36 | ], 37 | "post-install-cmd": [ 38 | "Illuminate\\Foundation\\ComposerScripts::postInstall", 39 | "php artisan optimize" 40 | ], 41 | "post-update-cmd": [ 42 | "Illuminate\\Foundation\\ComposerScripts::postUpdate", 43 | "php artisan optimize" 44 | ] 45 | }, 46 | "config": { 47 | "preferred-install": "dist", 48 | "sort-packages": true 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/Traits/BBCodeTrait.php: -------------------------------------------------------------------------------- 1 | \\1', 23 | '\\1', 24 | '\\1', 25 | '\\2', 26 | '', 27 | '', 28 | '

\\1

', 29 | '
', 30 | '\\2', 31 | ]; 32 | 33 | return preg_replace($search, $replace, $string); 34 | } 35 | 36 | return false; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /resources/assets/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | window._ = require("lodash"); 2 | 3 | /** 4 | * We'll load jQuery and the Bootstrap jQuery plugin which provides support 5 | * for JavaScript based Bootstrap features such as modals and tabs. This 6 | * code may be modified to fit the specific needs of your application. 7 | */ 8 | 9 | window.$ = window.jQuery = require("jquery"); 10 | 11 | require("bootstrap-sass"); 12 | 13 | /** 14 | * Vue is a modern JavaScript library for building interactive web interfaces 15 | * using reactive data binding and reusable components. Vue's API is clean 16 | * and simple, leaving you to focus on building your next great project. 17 | */ 18 | 19 | window.Vue = require("vue"); 20 | 21 | /** 22 | * We'll load the axios HTTP library which allows us to easily issue requests 23 | * to our Laravel back-end. This library automatically handles sending the 24 | * CSRF token as a header based on the value of the "XSRF" token cookie. 25 | */ 26 | 27 | window.axios = require("axios"); 28 | 29 | window.axios.defaults.headers.common = { 30 | "X-CSRF-TOKEN": window.Laravel.csrfToken, 31 | "X-Requested-With": "XMLHttpRequest" 32 | }; 33 | 34 | /** 35 | * Echo exposes an expressive API for subscribing to channels and listening 36 | * for events that are broadcast by Laravel. Echo and event broadcasting 37 | * allows your team to easily build robust real-time web applications. 38 | */ 39 | 40 | // import Echo from "laravel-echo" 41 | 42 | // window.Echo = new Echo({ 43 | // broadcaster: 'pusher', 44 | // key: 'your-pusher-key' 45 | // }); 46 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | middleware('notadmin'); 21 | Route::get('tickets/{ticket_id}', 'TicketsController@show'); 22 | Route::post('comment', 'CommentsController@postComment'); 23 | 24 | Route::group(['prefix' => 'admin', 'middleware' => 'admin', 'namespace' => 'Admin'], function () { 25 | Route::get('/', 'DashboardController@index'); 26 | Route::get('tickets/{status?}', 'TicketsController@tickets'); 27 | Route::get('categories', 'CategoryController@show'); 28 | Route::post('categories', 'CategoryController@add'); 29 | Route::get('administrators', 'AdminsController@show'); 30 | Route::post('administrators', 'AdminsController@add'); 31 | Route::delete('administrators/{user_id}', 'AdminsController@delete'); 32 | Route::delete('category/{category_id}', 'CategoryController@delete'); 33 | Route::post('change_status/{ticket_id}', 'TicketsController@changeStatus'); 34 | }); 35 | -------------------------------------------------------------------------------- /app/Http/Controllers/CommentsController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 20 | } 21 | 22 | public function postComment(Request $request) // AppMailer $mailer 23 | { 24 | $this->validate($request, [ 25 | 'comment' => 'required', 26 | 'ticket_id' => 'required|exists:tickets,ticket_id', 27 | ]); 28 | 29 | $ticket = Ticket::where('ticket_id', $request->input('ticket_id'))->first(); 30 | if (Auth::id() != $ticket->user_id && !Auth::user()->is_admin) { 31 | abort(403, 'Unauthorized action.'); 32 | } 33 | 34 | $comment = Comment::create([ 35 | 'ticket_id' => $ticket->id, 36 | 'user_id' => Auth::user()->id, 37 | 'comment' => $this->bbcode(htmlspecialchars($request->input('comment'))), 38 | ]); 39 | // send mail if the user commenting is not the ticket owner 40 | if ($comment->ticket->user->id != Auth::id()) { 41 | Mail::to($comment->ticket->user->email)->send(new TicketCommented($comment->ticket->user, $comment, $comment->ticket)); 42 | } 43 | 44 | return redirect()->back()->with('status', 'Your comment has been submitted.'); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/TicketsController.php: -------------------------------------------------------------------------------- 1 | middleware('admin'); 16 | } 17 | 18 | public function tickets($status = null) 19 | { 20 | if ($status == 'open') { 21 | $tickets = Ticket::where('status', 'Open')->paginate(10); 22 | } elseif ($status == 'closed') { 23 | $tickets = Ticket::where('status', 'Closed')->paginate(10); 24 | } else { 25 | $tickets = Ticket::paginate(10); 26 | } 27 | $categories = Category::all(); 28 | 29 | return view('tickets.index', compact('tickets', 'categories')); 30 | } 31 | 32 | public function changeStatus($ticket_id) 33 | { 34 | $ticket = Ticket::where('ticket_id', $ticket_id)->firstOrFail(); 35 | if ($ticket->status == 'Open') { 36 | $ticket->status = 'Closed'; 37 | } elseif ($ticket->status == 'Closed') { 38 | $ticket->status = 'Open'; 39 | } 40 | 41 | $ticket->save(); 42 | 43 | Mail::to($ticket->user->email)->send(new StatusChanged($ticket->user, $ticket)); 44 | 45 | if ($ticket->status == 'Open') { 46 | return redirect()->back()->with('status', 'The ticket has been reopened.'); 47 | } elseif ($ticket->status == 'Closed') { 48 | return redirect()->back()->with('status', 'The ticket has been closed.'); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/DashboardController.php: -------------------------------------------------------------------------------- 1 | count(); 16 | $closed_tickets_count = Ticket::where('status', 'Closed')->count(); 17 | // Per Category pagination 18 | $categories = Category::paginate(10, ['*'], 'cat_page'); 19 | // Total tickets counter per category for google pie chart 20 | $categories_all = Category::all(); 21 | $categories_share = []; 22 | foreach ($categories_all as $cat) { 23 | $categories_share[$cat->name] = $cat->tickets->count(); 24 | } 25 | // Per User 26 | $users = User::paginate(10); 27 | if (request()->has('cat_page')) { 28 | $active_tab = 'cat'; 29 | } elseif (request()->has('agents_page')) { 30 | $active_tab = 'agents'; 31 | } elseif (request()->has('users_page')) { 32 | $active_tab = 'users'; 33 | } else { 34 | $active_tab = 'cat'; 35 | } 36 | 37 | return view( 38 | 'admin.dashboard', 39 | compact( 40 | 'open_tickets_count', 41 | 'closed_tickets_count', 42 | 'tickets_count', 43 | 'categories', 44 | 'users', 45 | 'categories_share', 46 | 'active_tab' 47 | )); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /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 | // 40 | ], 41 | ], 42 | 43 | 'redis' => [ 44 | 'driver' => 'redis', 45 | 'connection' => 'default', 46 | ], 47 | 48 | 'log' => [ 49 | 'driver' => 'log', 50 | ], 51 | 52 | 'null' => [ 53 | 'driver' => 'null', 54 | ], 55 | 56 | ], 57 | 58 | ]; 59 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 32 | 33 | $status = $kernel->handle( 34 | $input = new Symfony\Component\Console\Input\ArgvInput, 35 | new Symfony\Component\Console\Output\ConsoleOutput 36 | ); 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Shutdown The Application 41 | |-------------------------------------------------------------------------- 42 | | 43 | | Once Artisan has finished running. We will fire off the shutdown events 44 | | so that any final work may be done by the application before we shut 45 | | down the process. This is the last thing to happen to the request. 46 | | 47 | */ 48 | 49 | $kernel->terminate($input, $status); 50 | 51 | exit($status); 52 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | 9 | /* 10 | |-------------------------------------------------------------------------- 11 | | Register The Auto Loader 12 | |-------------------------------------------------------------------------- 13 | | 14 | | Composer provides a convenient, automatically generated class loader for 15 | | our application. We just need to utilize it! We'll simply require it 16 | | into the script here so that we don't have to worry about manual 17 | | loading any of our classes later on. It feels nice to relax. 18 | | 19 | */ 20 | 21 | require __DIR__.'/../bootstrap/autoload.php'; 22 | 23 | /* 24 | |-------------------------------------------------------------------------- 25 | | Turn On The Lights 26 | |-------------------------------------------------------------------------- 27 | | 28 | | We need to illuminate PHP development, so let us turn on the lights. 29 | | This bootstraps the framework and gets it ready for use, then it 30 | | will load up this application so that we can run it and send 31 | | the responses back to the browser and delight our users. 32 | | 33 | */ 34 | 35 | $app = require_once __DIR__.'/../bootstrap/app.php'; 36 | 37 | /* 38 | |-------------------------------------------------------------------------- 39 | | Run The Application 40 | |-------------------------------------------------------------------------- 41 | | 42 | | Once we have the application, we can handle the incoming request 43 | | through the kernel, and send the associated response back to 44 | | the client's browser allowing them to enjoy the creative 45 | | and wonderful application we have prepared for them. 46 | | 47 | */ 48 | 49 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); 50 | 51 | $response = $kernel->handle( 52 | $request = Illuminate\Http\Request::capture() 53 | ); 54 | 55 | $response->send(); 56 | 57 | $kernel->terminate($request, $response); 58 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/email.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Reset Password
9 |
10 | @if (session('status')) 11 |
12 | {{ session('status') }} 13 |
14 | @endif 15 | 16 |
17 | {{ csrf_field() }} 18 | 19 |
20 | 21 | 22 |
23 | 24 | 25 | @if ($errors->has('email')) 26 | 27 | {{ $errors->first('email') }} 28 | 29 | @endif 30 |
31 |
32 | 33 |
34 |
35 | 38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 | @endsection 47 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 63 | return response()->json(['error' => 'Unauthenticated.'], 401); 64 | } 65 | 66 | return redirect()->guest('login'); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /app/Http/Controllers/TicketsController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 20 | } 21 | 22 | public function create() 23 | { 24 | $categories = Category::all(); 25 | 26 | return view('tickets.create', compact('categories')); 27 | } 28 | 29 | public function store(Request $request) 30 | { 31 | $this->validate($request, [ 32 | 'title' => 'required', 33 | 'category' => 'required', 34 | 'priority' => 'required', 35 | 'message' => 'required', 36 | ]); 37 | $ticket = new Ticket([ 38 | 'title' => $request->input('title'), 39 | 'user_id' => Auth::user()->id, 40 | 'ticket_id' => strtoupper(str_random(10)), 41 | 'category_id' => $request->input('category'), 42 | 'priority' => $request->input('priority'), 43 | 'message' => $this->bbcode(htmlspecialchars($request->input('message'))), 44 | ]); 45 | 46 | $ticket->save(); 47 | 48 | Mail::to(Auth::user()->email)->send(new TicketCreated(Auth::user(), $ticket)); 49 | 50 | return redirect()->to('tickets/'.$ticket->ticket_id)->with('status', "A ticket with ID: #$ticket->ticket_id has been opened."); 51 | } 52 | 53 | public function userTickets() 54 | { 55 | $tickets = Ticket::where('user_id', Auth::user()->id)->paginate(10); 56 | $categories = Category::all(); 57 | 58 | return view('tickets.user_tickets', compact('tickets', 'categories')); 59 | } 60 | 61 | public function show($ticket_id) 62 | { 63 | $ticket = Ticket::where('ticket_id', $ticket_id)->firstOrFail(); 64 | 65 | $comments = $ticket->comments; 66 | 67 | $category = $ticket->category; 68 | 69 | return view('tickets.show', compact('ticket', 'category', 'comments')); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | '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' => '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_KEY'), 61 | 'secret' => env('AWS_SECRET'), 62 | 'region' => env('AWS_REGION'), 63 | 'bucket' => env('AWS_BUCKET'), 64 | ], 65 | 66 | ], 67 | 68 | ]; 69 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Support Center 2 |

3 | Support Center 4 |

5 | 6 | [![StyleCI](https://styleci.io/repos/81247995/shield?branch=master&style=flat)](https://styleci.io/repos/81247995) 7 | [![Greenkeeper badge](https://badges.greenkeeper.io/m1guelpf/support_center.svg)](https://greenkeeper.io/) 8 | 9 | Complete support center built with Laravel 10 | 11 | ## Features: 12 | 13 | - Tickets, comments & statuses 14 | - Bootstrap: Using Bootstrap, we make the frontend easy to change, so you can adapt it to your own needs. 15 | - Mail Notifications: Every time you make an important action (comment, close/reopen, create ticket), the user gets notified by email. 16 | - Simple: Support Center includes the basic features, but you can extend it to cover your needs! 17 | - More coming soon: Support Center is under active support so, if you want to help or have ideas, go ahead and Contribute! 18 | 19 | ## Preview: 20 | 21 | Want to preview the script before installing? Check the [YouTube video](https://youtu.be/huFLWRFBlg4)! 22 | 23 | ## Requirements: 24 | 25 | - PHP >= 5.6.4 26 | - Composer 27 | - MySQL 28 | - MySQL PHP Extension 29 | - OpenSSL PHP Extension 30 | - PDO PHP Extension 31 | - Mbstring PHP Extension 32 | - Tokenizer PHP Extension 33 | - XML PHP Extension 34 | 35 | (Don't worry! normally, this is included in your PHP installation) 36 | 37 | ## Installation: 38 | 39 | 1. Clone or download this repo to somewhere on your server. 40 | 2. Rename .env.example to .env and fill the database settings. 41 | 3. Run ```composer update```, ```php artisan key:generate``` and ```php artisan migrate```. 42 | 4. The first user created will be the admin user. 43 | 5. Enjoy! 44 | 45 | ## Found an issue? Something to improve? [Open an issue](https://github.com/m1guelpf/orgmanager/issues/new)! 46 | 47 | ## Credits: 48 | 49 | - [PHP](https://php.net) - For their awesome work on developing PHP. 50 | - [MySQL](https://mysql.com) - For their awesome DB software. 51 | - [Laravel](https://laravel.com) - For this their framework. 52 | - [Bootstrap](http://getbootstrap.com/) - For their awesome HTML, CSS & JS framework 53 | 54 | ## License: 55 | 56 | Support Center is licensed under the Mozilla Public License. Check the [License File](LICENSE) for more information. 57 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | [ 30 | \App\Http\Middleware\EncryptCookies::class, 31 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 32 | \Illuminate\Session\Middleware\StartSession::class, 33 | // \Illuminate\Session\Middleware\AuthenticateSession::class, 34 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 35 | \App\Http\Middleware\VerifyCsrfToken::class, 36 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 37 | ], 38 | 39 | 'api' => [ 40 | 'throttle:60,1', 41 | 'bindings', 42 | ], 43 | ]; 44 | 45 | /** 46 | * The application's route middleware. 47 | * 48 | * These middleware may be assigned to groups or used individually. 49 | * 50 | * @var array 51 | */ 52 | protected $routeMiddleware = [ 53 | 'auth' => \Illuminate\Auth\Middleware\Authenticate::class, 54 | 'admin' => \App\Http\Middleware\AdminMiddleware::class, 55 | 'notadmin' => \App\Http\Middleware\NotAdminMiddleware::class, 56 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 57 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 58 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 59 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 60 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 61 | ]; 62 | } 63 | -------------------------------------------------------------------------------- /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 | * 47 | * @return \Illuminate\Contracts\Validation\Validator 48 | */ 49 | protected function validator(array $data) 50 | { 51 | return Validator::make($data, [ 52 | 'name' => 'required|max:255', 53 | 'email' => 'required|email|max:255|unique:users', 54 | 'password' => 'required|min:6|confirmed', 55 | ]); 56 | } 57 | 58 | /** 59 | * Create a new user instance after a valid registration. 60 | * 61 | * @param array $data 62 | * 63 | * @return User 64 | */ 65 | protected function create(array $data) 66 | { 67 | if (count(User::where('is_admin', true)->get()) == 0) { 68 | return User::create([ 69 | 'name' => $data['name'], 70 | 'email' => $data['email'], 71 | 'password' => bcrypt($data['password']), 72 | 'is_admin' => true, 73 | ]); 74 | } else { 75 | return User::create([ 76 | 'name' => $data['name'], 77 | 'email' => $data['email'], 78 | 'password' => bcrypt($data['password']), 79 | ]); 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /resources/views/home.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{ config('app.name') }} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | @if (Route::has('login')) 19 | 32 | @endif 33 | 34 |
35 |
36 | {{ config('app.name') }} 37 |
38 | 39 | 59 |
60 |
61 | 62 | 63 | -------------------------------------------------------------------------------- /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' => 'your-public-key', 54 | 'secret' => 'your-secret-key', 55 | 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id', 56 | 'queue' => 'your-queue-name', 57 | '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/admin/categories.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('title', 'Categories') 4 | 5 | @section('content') 6 |
7 |
8 |
9 |
10 | Categories 11 |
12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | @foreach ($categories as $category) 24 | 25 | 28 | 31 | 38 | 39 | @endforeach 40 | 41 |
IDNameActions
26 | {{ $category->id }} 27 | 29 | {{ $category->name }} 30 | 32 |
33 | {!! csrf_field() !!} 34 | {{ method_field('DELETE') }} 35 | 36 |
37 |
42 |

43 |
44 |
45 | {!! csrf_field() !!} 46 | 47 | 48 |
49 | @if (count($errors) > 0) 50 |
51 |
    52 | @foreach ($errors->all() as $error) 53 |
  • {{ $error }}
  • 54 | @endforeach 55 |
56 |
57 | @endif 58 |
59 |
60 |
61 |
62 |
63 | @endsection 64 | -------------------------------------------------------------------------------- /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' => 'laravel', 90 | 91 | ]; 92 | -------------------------------------------------------------------------------- /resources/views/tickets/user_tickets.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('title', 'My Tickets') 4 | 5 | @section('content') 6 |
7 |
8 |
9 |
10 | My Tickets 11 |
12 | 13 |
14 | @if ($tickets->isEmpty()) 15 |

You have not created any tickets. Open a new ticket!

16 | @else 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | @foreach ($tickets as $ticket) 28 | 29 | 36 | 41 | 48 | 49 | 50 | @endforeach 51 | 52 |
CategoryTitleStatusLast Updated
30 | @foreach ($categories as $category) 31 | @if ($category->id === $ticket->category_id) 32 | {{ $category->name }} 33 | @endif 34 | @endforeach 35 | 37 | 38 | #{{ $ticket->ticket_id }} - {{ $ticket->title }} 39 | 40 | 42 | @if ($ticket->status === 'Open') 43 | {{ $ticket->status }} 44 | @else 45 | {{ $ticket->status }} 46 | @endif 47 | {{ $ticket->updated_at }}
53 | 54 | {{ $tickets->render() }} 55 | @endif 56 |
57 |
58 |
59 |
60 | @endsection 61 | -------------------------------------------------------------------------------- /resources/views/admin/admins.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('title', 'Administrators') 4 | 5 | @section('content') 6 |
7 |
8 |
9 |
10 | Administrator 11 |
12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | @foreach ($administrators as $admin) 24 | 25 | 28 | 31 | 38 | 39 | @endforeach 40 | 41 |
IDNameActions
26 | {{ $admin->id }} 27 | 29 | {{ ucfirst($admin->name) }} 30 | 32 |
33 | {!! csrf_field() !!} 34 | {{ method_field('DELETE') }} 35 | 36 |
37 |
42 |

43 |
44 |
45 | {!! csrf_field() !!} 46 | 52 |
53 | 54 |
55 | @if (count($errors) > 0) 56 |
57 |
    58 | @foreach ($errors->all() as $error) 59 |
  • {{ $error }}
  • 60 | @endforeach 61 |
62 |
63 | @endif 64 |
65 |
66 |
67 |
68 |
69 | @endsection 70 | -------------------------------------------------------------------------------- /resources/views/auth/login.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Login
9 |
10 |
11 | {{ csrf_field() }} 12 | 13 |
14 | 15 | 16 |
17 | 18 | 19 | @if ($errors->has('email')) 20 | 21 | {{ $errors->first('email') }} 22 | 23 | @endif 24 |
25 |
26 | 27 |
28 | 29 | 30 |
31 | 32 | 33 | @if ($errors->has('password')) 34 | 35 | {{ $errors->first('password') }} 36 | 37 | @endif 38 |
39 |
40 | 41 |
42 |
43 |
44 | 47 |
48 |
49 |
50 | 51 |
52 |
53 | 56 | 57 | 58 | Forgot Your Password? 59 | 60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | @endsection 69 | -------------------------------------------------------------------------------- /resources/views/tickets/show.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('title', $ticket->title) 4 | 5 | @section('content') 6 |
7 |
8 |
9 |
10 | #{{ $ticket->ticket_id }} - {{ $ticket->title }} 11 |
12 | 13 |
14 | @include('includes.flash') 15 | 16 |
17 |

{!! $ticket->message !!}

18 |

Category: {{ $category->name }}

19 |

20 | @if ($ticket->status === 'Open') 21 | Status: {{ $ticket->status }} 22 | @else 23 | Status: {{ $ticket->status }} 24 | @endif 25 |

26 |

Created on: {{ $ticket->created_at->diffForHumans() }}

27 |
28 | 29 |
30 | 31 |
32 | @foreach ($comments as $comment) 33 |
34 |
35 | {{ $comment->user->name }} 36 | {{ $comment->created_at->format('Y-m-d') }} 37 |
38 | 39 |
40 | {!! $comment->comment !!} 41 |
42 |
43 | @endforeach 44 |
45 | 46 |
47 |
48 | {!! csrf_field() !!} 49 | 50 | 51 | @if ($errors->has('ticket_id')) 52 | 53 | {{ $errors->first('ticket_id') }} 54 | 55 | @endif 56 |
57 | 58 | 59 | @if ($errors->has('comment')) 60 | 61 | {{ $errors->first('comment') }} 62 | 63 | @endif 64 |
65 | 66 |
67 | 68 |
69 |
70 |
71 |
72 |
73 |
74 | @endsection 75 | -------------------------------------------------------------------------------- /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/views/auth/passwords/reset.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 | 27 | 28 | @if ($errors->has('email')) 29 | 30 | {{ $errors->first('email') }} 31 | 32 | @endif 33 |
34 |
35 | 36 |
37 | 38 | 39 |
40 | 41 | 42 | @if ($errors->has('password')) 43 | 44 | {{ $errors->first('password') }} 45 | 46 | @endif 47 |
48 |
49 | 50 |
51 | 52 |
53 | 54 | 55 | @if ($errors->has('password_confirmation')) 56 | 57 | {{ $errors->first('password_confirmation') }} 58 | 59 | @endif 60 |
61 |
62 | 63 |
64 |
65 | 68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | @endsection 77 | -------------------------------------------------------------------------------- /resources/views/auth/register.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Register
9 |
10 |
11 | {{ csrf_field() }} 12 | 13 |
14 | 15 | 16 |
17 | 18 | 19 | @if ($errors->has('name')) 20 | 21 | {{ $errors->first('name') }} 22 | 23 | @endif 24 |
25 |
26 | 27 |
28 | 29 | 30 |
31 | 32 | 33 | @if ($errors->has('email')) 34 | 35 | {{ $errors->first('email') }} 36 | 37 | @endif 38 |
39 |
40 | 41 |
42 | 43 | 44 |
45 | 46 | 47 | @if ($errors->has('password')) 48 | 49 | {{ $errors->first('password') }} 50 | 51 | @endif 52 |
53 |
54 | 55 |
56 | 57 | 58 |
59 | 60 |
61 |
62 | 63 |
64 |
65 | 68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | @endsection 77 | -------------------------------------------------------------------------------- /resources/views/tickets/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('title', 'All Tickets') 4 | 5 | @section('content') 6 |
7 |
8 |
9 |
10 | Tickets 11 |
12 | 13 |
14 | @if ($tickets->isEmpty()) 15 |

There are currently no tickets.

16 | @else 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | @foreach ($tickets as $ticket) 29 | 30 | 37 | 42 | 49 | 50 | 53 | 63 | 64 | @endforeach 65 | 66 |
CategoryTitleStatusLast UpdatedActions
31 | @foreach ($categories as $category) 32 | @if ($category->id === $ticket->category_id) 33 | {{ $category->name }} 34 | @endif 35 | @endforeach 36 | 38 | 39 | #{{ $ticket->ticket_id }} - {{ $ticket->title }} 40 | 41 | 43 | @if ($ticket->status === 'Open') 44 | {{ $ticket->status }} 45 | @else 46 | {{ $ticket->status }} 47 | @endif 48 | {{ $ticket->updated_at }} 51 | Comment 52 | 54 |
55 | {!! csrf_field() !!} 56 | @if ($ticket->status == 'Open') 57 | 58 | @elseif ($ticket->status == 'Closed') 59 | 60 | @endif 61 |
62 |
67 | 68 | {{ $tickets->links() }} 69 | @endif 70 |
71 |
72 |
73 |
74 | @endsection 75 | -------------------------------------------------------------------------------- /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 | 'charset' => 'utf8mb4', 50 | 'collation' => 'utf8mb4_unicode_ci', 51 | 'prefix' => '', 52 | 'strict' => true, 53 | 'engine' => null, 54 | ], 55 | 56 | 'pgsql' => [ 57 | 'driver' => 'pgsql', 58 | 'host' => env('DB_HOST', '127.0.0.1'), 59 | 'port' => env('DB_PORT', '5432'), 60 | 'database' => env('DB_DATABASE', 'forge'), 61 | 'username' => env('DB_USERNAME', 'forge'), 62 | 'password' => env('DB_PASSWORD', ''), 63 | 'charset' => 'utf8', 64 | 'prefix' => '', 65 | 'schema' => 'public', 66 | 'sslmode' => 'prefer', 67 | ], 68 | 69 | ], 70 | 71 | /* 72 | |-------------------------------------------------------------------------- 73 | | Migration Repository Table 74 | |-------------------------------------------------------------------------- 75 | | 76 | | This table keeps track of all the migrations that have already run for 77 | | your application. Using this information, we can determine which of 78 | | the migrations on disk haven't actually been run in the database. 79 | | 80 | */ 81 | 82 | 'migrations' => 'migrations', 83 | 84 | /* 85 | |-------------------------------------------------------------------------- 86 | | Redis Databases 87 | |-------------------------------------------------------------------------- 88 | | 89 | | Redis is an open source, fast, and advanced key-value store that also 90 | | provides a richer set of commands than a typical key-value systems 91 | | such as APC or Memcached. Laravel makes it easy to dig right in. 92 | | 93 | */ 94 | 95 | 'redis' => [ 96 | 97 | 'client' => 'predis', 98 | 99 | 'default' => [ 100 | 'host' => env('REDIS_HOST', '127.0.0.1'), 101 | 'password' => env('REDIS_PASSWORD', null), 102 | 'port' => env('REDIS_PORT', 6379), 103 | 'database' => 0, 104 | ], 105 | 106 | ], 107 | 108 | ]; 109 | -------------------------------------------------------------------------------- /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/tickets/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('title', 'Open Ticket') 4 | 5 | @section('content') 6 |
7 |
8 |
9 |
Open New Ticket
10 | 11 |
12 | @include('includes.flash') 13 | 14 |
15 | {!! csrf_field() !!} 16 | 17 |
18 | 19 | 20 |
21 | 22 | 23 | @if ($errors->has('title')) 24 | 25 | {{ $errors->first('title') }} 26 | 27 | @endif 28 |
29 |
30 | 31 |
32 | 33 | 34 |
35 | 41 | 42 | @if ($errors->has('category')) 43 | 44 | {{ $errors->first('category') }} 45 | 46 | @endif 47 |
48 |
49 | 50 |
51 | 52 | 53 |
54 | 60 | 61 | @if ($errors->has('priority')) 62 | 63 | {{ $errors->first('priority') }} 64 | 65 | @endif 66 |
67 |
68 | 69 |
70 | 71 | 72 |
73 | 74 | 75 | @if ($errors->has('message')) 76 | 77 | {{ $errors->first('message') }} 78 | 79 | @endif 80 |
81 |
82 | 83 |
84 |
85 | 88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 | @endsection 96 | -------------------------------------------------------------------------------- /resources/views/layouts/app.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @yield('title'.' | ', ''){{ config('app.name') }} 8 | 9 | 10 | 11 | 12 | 13 | 14 | @yield('css') 15 | 16 | 17 | 22 | 27 | 28 | 29 |
30 | 94 | 95 | @yield('content') 96 |
97 | @yield('footer') 98 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /resources/lang/en/validation.php: -------------------------------------------------------------------------------- 1 | 'The :attribute must be accepted.', 17 | 'active_url' => 'The :attribute is not a valid URL.', 18 | 'after' => 'The :attribute must be a date after :date.', 19 | 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', 20 | 'alpha' => 'The :attribute may only contain letters.', 21 | 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.', 22 | 'alpha_num' => 'The :attribute may only contain letters and numbers.', 23 | 'array' => 'The :attribute must be an array.', 24 | 'before' => 'The :attribute must be a date before :date.', 25 | 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', 26 | 'between' => [ 27 | 'numeric' => 'The :attribute must be between :min and :max.', 28 | 'file' => 'The :attribute must be between :min and :max kilobytes.', 29 | 'string' => 'The :attribute must be between :min and :max characters.', 30 | 'array' => 'The :attribute must have between :min and :max items.', 31 | ], 32 | 'boolean' => 'The :attribute field must be true or false.', 33 | 'confirmed' => 'The :attribute confirmation does not match.', 34 | 'date' => 'The :attribute is not a valid date.', 35 | 'date_format' => 'The :attribute does not match the format :format.', 36 | 'different' => 'The :attribute and :other must be different.', 37 | 'digits' => 'The :attribute must be :digits digits.', 38 | 'digits_between' => 'The :attribute must be between :min and :max digits.', 39 | 'dimensions' => 'The :attribute has invalid image dimensions.', 40 | 'distinct' => 'The :attribute field has a duplicate value.', 41 | 'email' => 'The :attribute must be a valid email address.', 42 | 'exists' => 'The selected :attribute is invalid.', 43 | 'file' => 'The :attribute must be a file.', 44 | 'filled' => 'The :attribute field is required.', 45 | 'image' => 'The :attribute must be an image.', 46 | 'in' => 'The selected :attribute is invalid.', 47 | 'in_array' => 'The :attribute field does not exist in :other.', 48 | 'integer' => 'The :attribute must be an integer.', 49 | 'ip' => 'The :attribute must be a valid IP address.', 50 | 'json' => 'The :attribute must be a valid JSON string.', 51 | 'max' => [ 52 | 'numeric' => 'The :attribute may not be greater than :max.', 53 | 'file' => 'The :attribute may not be greater than :max kilobytes.', 54 | 'string' => 'The :attribute may not be greater than :max characters.', 55 | 'array' => 'The :attribute may not have more than :max items.', 56 | ], 57 | 'mimes' => 'The :attribute must be a file of type: :values.', 58 | 'mimetypes' => 'The :attribute must be a file of type: :values.', 59 | 'min' => [ 60 | 'numeric' => 'The :attribute must be at least :min.', 61 | 'file' => 'The :attribute must be at least :min kilobytes.', 62 | 'string' => 'The :attribute must be at least :min characters.', 63 | 'array' => 'The :attribute must have at least :min items.', 64 | ], 65 | 'not_in' => 'The selected :attribute is invalid.', 66 | 'numeric' => 'The :attribute must be a number.', 67 | 'present' => 'The :attribute field must be present.', 68 | 'regex' => 'The :attribute format is invalid.', 69 | 'required' => 'The :attribute field is required.', 70 | 'required_if' => 'The :attribute field is required when :other is :value.', 71 | 'required_unless' => 'The :attribute field is required unless :other is in :values.', 72 | 'required_with' => 'The :attribute field is required when :values is present.', 73 | 'required_with_all' => 'The :attribute field is required when :values is present.', 74 | 'required_without' => 'The :attribute field is required when :values is not present.', 75 | 'required_without_all' => 'The :attribute field is required when none of :values are present.', 76 | 'same' => 'The :attribute and :other must match.', 77 | 'size' => [ 78 | 'numeric' => 'The :attribute must be :size.', 79 | 'file' => 'The :attribute must be :size kilobytes.', 80 | 'string' => 'The :attribute must be :size characters.', 81 | 'array' => 'The :attribute must contain :size items.', 82 | ], 83 | 'string' => 'The :attribute must be a string.', 84 | 'timezone' => 'The :attribute must be a valid zone.', 85 | 'unique' => 'The :attribute has already been taken.', 86 | 'uploaded' => 'The :attribute failed to upload.', 87 | 'url' => 'The :attribute format is invalid.', 88 | 89 | /* 90 | |-------------------------------------------------------------------------- 91 | | Custom Validation Language Lines 92 | |-------------------------------------------------------------------------- 93 | | 94 | | Here you may specify custom validation messages for attributes using the 95 | | convention "attribute.rule" to name the lines. This makes it quick to 96 | | specify a specific custom language line for a given attribute rule. 97 | | 98 | */ 99 | 100 | 'custom' => [ 101 | 'attribute-name' => [ 102 | 'rule-name' => 'custom-message', 103 | ], 104 | ], 105 | 106 | /* 107 | |-------------------------------------------------------------------------- 108 | | Custom Validation Attributes 109 | |-------------------------------------------------------------------------- 110 | | 111 | | The following language lines are used to swap attribute place-holders 112 | | with something more reader friendly such as E-Mail Address instead 113 | | of "email". This simply helps us make messages a little cleaner. 114 | | 115 | */ 116 | 117 | 'attributes' => [], 118 | 119 | ]; 120 | -------------------------------------------------------------------------------- /config/session.php: -------------------------------------------------------------------------------- 1 | env('SESSION_DRIVER', 'file'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Session Lifetime 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may specify the number of minutes that you wish the session 27 | | to be allowed to remain idle before it expires. If you want them 28 | | to immediately expire on the browser closing, set that option. 29 | | 30 | */ 31 | 32 | 'lifetime' => 120, 33 | 34 | 'expire_on_close' => false, 35 | 36 | /* 37 | |-------------------------------------------------------------------------- 38 | | Session Encryption 39 | |-------------------------------------------------------------------------- 40 | | 41 | | This option allows you to easily specify that all of your session data 42 | | should be encrypted before it is stored. All encryption will be run 43 | | automatically by Laravel and you can use the Session like normal. 44 | | 45 | */ 46 | 47 | 'encrypt' => false, 48 | 49 | /* 50 | |-------------------------------------------------------------------------- 51 | | Session File Location 52 | |-------------------------------------------------------------------------- 53 | | 54 | | When using the native session driver, we need a location where session 55 | | files may be stored. A default has been set for you but a different 56 | | location may be specified. This is only needed for file sessions. 57 | | 58 | */ 59 | 60 | 'files' => storage_path('framework/sessions'), 61 | 62 | /* 63 | |-------------------------------------------------------------------------- 64 | | Session Database Connection 65 | |-------------------------------------------------------------------------- 66 | | 67 | | When using the "database" or "redis" session drivers, you may specify a 68 | | connection that should be used to manage these sessions. This should 69 | | correspond to a connection in your database configuration options. 70 | | 71 | */ 72 | 73 | 'connection' => null, 74 | 75 | /* 76 | |-------------------------------------------------------------------------- 77 | | Session Database Table 78 | |-------------------------------------------------------------------------- 79 | | 80 | | When using the "database" session driver, you may specify the table we 81 | | should use to manage the sessions. Of course, a sensible default is 82 | | provided for you; however, you are free to change this as needed. 83 | | 84 | */ 85 | 86 | 'table' => 'sessions', 87 | 88 | /* 89 | |-------------------------------------------------------------------------- 90 | | Session Cache Store 91 | |-------------------------------------------------------------------------- 92 | | 93 | | When using the "apc" or "memcached" session drivers, you may specify a 94 | | cache store that should be used for these sessions. This value must 95 | | correspond with one of the application's configured cache stores. 96 | | 97 | */ 98 | 99 | 'store' => null, 100 | 101 | /* 102 | |-------------------------------------------------------------------------- 103 | | Session Sweeping Lottery 104 | |-------------------------------------------------------------------------- 105 | | 106 | | Some session drivers must manually sweep their storage location to get 107 | | rid of old sessions from storage. Here are the chances that it will 108 | | happen on a given request. By default, the odds are 2 out of 100. 109 | | 110 | */ 111 | 112 | 'lottery' => [2, 100], 113 | 114 | /* 115 | |-------------------------------------------------------------------------- 116 | | Session Cookie Name 117 | |-------------------------------------------------------------------------- 118 | | 119 | | Here you may change the name of the cookie used to identify a session 120 | | instance by ID. The name specified here will get used every time a 121 | | new session cookie is created by the framework for every driver. 122 | | 123 | */ 124 | 125 | 'cookie' => 'laravel_session', 126 | 127 | /* 128 | |-------------------------------------------------------------------------- 129 | | Session Cookie Path 130 | |-------------------------------------------------------------------------- 131 | | 132 | | The session cookie path determines the path for which the cookie will 133 | | be regarded as available. Typically, this will be the root path of 134 | | your application but you are free to change this when necessary. 135 | | 136 | */ 137 | 138 | 'path' => '/', 139 | 140 | /* 141 | |-------------------------------------------------------------------------- 142 | | Session Cookie Domain 143 | |-------------------------------------------------------------------------- 144 | | 145 | | Here you may change the domain of the cookie used to identify a session 146 | | in your application. This will determine which domains the cookie is 147 | | available to in your application. A sensible default has been set. 148 | | 149 | */ 150 | 151 | 'domain' => env('SESSION_DOMAIN', null), 152 | 153 | /* 154 | |-------------------------------------------------------------------------- 155 | | HTTPS Only Cookies 156 | |-------------------------------------------------------------------------- 157 | | 158 | | By setting this option to true, session cookies will only be sent back 159 | | to the server if the browser has a HTTPS connection. This will keep 160 | | the cookie from being sent to you if it can not be done securely. 161 | | 162 | */ 163 | 164 | 'secure' => env('SESSION_SECURE_COOKIE', false), 165 | 166 | /* 167 | |-------------------------------------------------------------------------- 168 | | HTTP Access Only 169 | |-------------------------------------------------------------------------- 170 | | 171 | | Setting this value to true will prevent JavaScript from accessing the 172 | | value of the cookie and the cookie will only be accessible through 173 | | the HTTP protocol. You are free to modify this option if needed. 174 | | 175 | */ 176 | 177 | 'http_only' => true, 178 | 179 | ]; 180 | -------------------------------------------------------------------------------- /resources/views/admin/dashboard.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('css') 4 | 5 | 6 | 7 | 24 | @endsection 25 | 26 | @section('content') 27 | @if($tickets_count) 28 |
29 | 46 | 63 | 80 |
81 | 82 |
83 |
84 | {{--
--}} 85 |
86 |
87 | Tickets per category 88 |
89 |
90 |
91 |
92 |
93 | {{--
--}} 94 |
95 |
96 |
97 | 176 |
177 | @else 178 |
179 | Nothing here! 180 |
181 | @endif 182 | @if($tickets_count) 183 | 184 | 185 | 203 | @endif 204 | @endsection 205 | -------------------------------------------------------------------------------- /config/app.php: -------------------------------------------------------------------------------- 1 | 'Support Center', 16 | 17 | /* 18 | |-------------------------------------------------------------------------- 19 | | Application Environment 20 | |-------------------------------------------------------------------------- 21 | | 22 | | This value determines the "environment" your application is currently 23 | | running in. This may determine how you prefer to configure various 24 | | services your application utilizes. Set this in your ".env" file. 25 | | 26 | */ 27 | 28 | 'env' => env('APP_ENV', 'production'), 29 | 30 | /* 31 | |-------------------------------------------------------------------------- 32 | | Application Debug Mode 33 | |-------------------------------------------------------------------------- 34 | | 35 | | When your application is in debug mode, detailed error messages with 36 | | stack traces will be shown on every error that occurs within your 37 | | application. If disabled, a simple generic error page is shown. 38 | | 39 | */ 40 | 41 | 'debug' => env('APP_DEBUG', false), 42 | 43 | /* 44 | |-------------------------------------------------------------------------- 45 | | Application URL 46 | |-------------------------------------------------------------------------- 47 | | 48 | | This URL is used by the console to properly generate URLs when using 49 | | the Artisan command line tool. You should set this to the root of 50 | | your application so that it is used when running Artisan tasks. 51 | | 52 | */ 53 | 54 | 'url' => env('APP_URL', 'http://localhost'), 55 | 56 | /* 57 | |-------------------------------------------------------------------------- 58 | | Application Timezone 59 | |-------------------------------------------------------------------------- 60 | | 61 | | Here you may specify the default timezone for your application, which 62 | | will be used by the PHP date and date-time functions. We have gone 63 | | ahead and set this to a sensible default for you out of the box. 64 | | 65 | */ 66 | 67 | 'timezone' => 'UTC', 68 | 69 | /* 70 | |-------------------------------------------------------------------------- 71 | | Application Locale Configuration 72 | |-------------------------------------------------------------------------- 73 | | 74 | | The application locale determines the default locale that will be used 75 | | by the translation service provider. You are free to set this value 76 | | to any of the locales which will be supported by the application. 77 | | 78 | */ 79 | 80 | 'locale' => 'en', 81 | 82 | /* 83 | |-------------------------------------------------------------------------- 84 | | Application Fallback Locale 85 | |-------------------------------------------------------------------------- 86 | | 87 | | The fallback locale determines the locale to use when the current one 88 | | is not available. You may change the value to correspond to any of 89 | | the language folders that are provided through your application. 90 | | 91 | */ 92 | 93 | 'fallback_locale' => 'en', 94 | 95 | /* 96 | |-------------------------------------------------------------------------- 97 | | Encryption Key 98 | |-------------------------------------------------------------------------- 99 | | 100 | | This key is used by the Illuminate encrypter service and should be set 101 | | to a random, 32 character string, otherwise these encrypted strings 102 | | will not be safe. Please do this before deploying an application! 103 | | 104 | */ 105 | 106 | 'key' => env('APP_KEY'), 107 | 108 | 'cipher' => 'AES-256-CBC', 109 | 110 | /* 111 | |-------------------------------------------------------------------------- 112 | | Logging Configuration 113 | |-------------------------------------------------------------------------- 114 | | 115 | | Here you may configure the log settings for your application. Out of 116 | | the box, Laravel uses the Monolog PHP logging library. This gives 117 | | you a variety of powerful log handlers / formatters to utilize. 118 | | 119 | | Available Settings: "single", "daily", "syslog", "errorlog" 120 | | 121 | */ 122 | 123 | 'log' => env('APP_LOG', 'single'), 124 | 125 | 'log_level' => env('APP_LOG_LEVEL', 'debug'), 126 | 127 | /* 128 | |-------------------------------------------------------------------------- 129 | | Autoloaded Service Providers 130 | |-------------------------------------------------------------------------- 131 | | 132 | | The service providers listed here will be automatically loaded on the 133 | | request to your application. Feel free to add your own services to 134 | | this array to grant expanded functionality to your applications. 135 | | 136 | */ 137 | 138 | 'providers' => [ 139 | 140 | /* 141 | * Laravel Framework Service Providers... 142 | */ 143 | Illuminate\Auth\AuthServiceProvider::class, 144 | Illuminate\Broadcasting\BroadcastServiceProvider::class, 145 | Illuminate\Bus\BusServiceProvider::class, 146 | Illuminate\Cache\CacheServiceProvider::class, 147 | Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, 148 | Illuminate\Cookie\CookieServiceProvider::class, 149 | Illuminate\Database\DatabaseServiceProvider::class, 150 | Illuminate\Encryption\EncryptionServiceProvider::class, 151 | Illuminate\Filesystem\FilesystemServiceProvider::class, 152 | Illuminate\Foundation\Providers\FoundationServiceProvider::class, 153 | Illuminate\Hashing\HashServiceProvider::class, 154 | Illuminate\Mail\MailServiceProvider::class, 155 | Illuminate\Notifications\NotificationServiceProvider::class, 156 | Illuminate\Pagination\PaginationServiceProvider::class, 157 | Illuminate\Pipeline\PipelineServiceProvider::class, 158 | Illuminate\Queue\QueueServiceProvider::class, 159 | Illuminate\Redis\RedisServiceProvider::class, 160 | Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, 161 | Illuminate\Session\SessionServiceProvider::class, 162 | Illuminate\Translation\TranslationServiceProvider::class, 163 | Illuminate\Validation\ValidationServiceProvider::class, 164 | Illuminate\View\ViewServiceProvider::class, 165 | 166 | /* 167 | * Package Service Providers... 168 | */ 169 | Laravel\Tinker\TinkerServiceProvider::class, 170 | 171 | /* 172 | * Application Service Providers... 173 | */ 174 | App\Providers\AppServiceProvider::class, 175 | App\Providers\AuthServiceProvider::class, 176 | // App\Providers\BroadcastServiceProvider::class, 177 | App\Providers\EventServiceProvider::class, 178 | App\Providers\RouteServiceProvider::class, 179 | 180 | ], 181 | 182 | /* 183 | |-------------------------------------------------------------------------- 184 | | Class Aliases 185 | |-------------------------------------------------------------------------- 186 | | 187 | | This array of class aliases will be registered when this application 188 | | is started. However, feel free to register as many as you wish as 189 | | the aliases are "lazy" loaded so they don't hinder performance. 190 | | 191 | */ 192 | 193 | 'aliases' => [ 194 | 195 | 'App' => Illuminate\Support\Facades\App::class, 196 | 'Artisan' => Illuminate\Support\Facades\Artisan::class, 197 | 'Auth' => Illuminate\Support\Facades\Auth::class, 198 | 'Blade' => Illuminate\Support\Facades\Blade::class, 199 | 'Broadcast' => Illuminate\Support\Facades\Broadcast::class, 200 | 'Bus' => Illuminate\Support\Facades\Bus::class, 201 | 'Cache' => Illuminate\Support\Facades\Cache::class, 202 | 'Config' => Illuminate\Support\Facades\Config::class, 203 | 'Cookie' => Illuminate\Support\Facades\Cookie::class, 204 | 'Crypt' => Illuminate\Support\Facades\Crypt::class, 205 | 'DB' => Illuminate\Support\Facades\DB::class, 206 | 'Eloquent' => Illuminate\Database\Eloquent\Model::class, 207 | 'Event' => Illuminate\Support\Facades\Event::class, 208 | 'File' => Illuminate\Support\Facades\File::class, 209 | 'Gate' => Illuminate\Support\Facades\Gate::class, 210 | 'Hash' => Illuminate\Support\Facades\Hash::class, 211 | 'Lang' => Illuminate\Support\Facades\Lang::class, 212 | 'Log' => Illuminate\Support\Facades\Log::class, 213 | 'Mail' => Illuminate\Support\Facades\Mail::class, 214 | 'Notification' => Illuminate\Support\Facades\Notification::class, 215 | 'Password' => Illuminate\Support\Facades\Password::class, 216 | 'Queue' => Illuminate\Support\Facades\Queue::class, 217 | 'Redirect' => Illuminate\Support\Facades\Redirect::class, 218 | 'Redis' => Illuminate\Support\Facades\Redis::class, 219 | 'Request' => Illuminate\Support\Facades\Request::class, 220 | 'Response' => Illuminate\Support\Facades\Response::class, 221 | 'Route' => Illuminate\Support\Facades\Route::class, 222 | 'Schema' => Illuminate\Support\Facades\Schema::class, 223 | 'Session' => Illuminate\Support\Facades\Session::class, 224 | 'Storage' => Illuminate\Support\Facades\Storage::class, 225 | 'URL' => Illuminate\Support\Facades\URL::class, 226 | 'Validator' => Illuminate\Support\Facades\Validator::class, 227 | 'View' => Illuminate\Support\Facades\View::class, 228 | 229 | ], 230 | 231 | ]; 232 | -------------------------------------------------------------------------------- /resources/views/mail/ticket_info.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Ticket #{{ $ticket->ticket_id }} opened 7 | 8 | 173 | 174 | 177 | 178 | 186 | 187 | 266 | 267 | 268 | 269 | 270 | 271 | 300 | 301 | 302 | 375 | 376 | 377 | 388 | 389 |
272 |
273 | 274 | 275 | 276 | 296 | 297 |
277 | 282 |
283 | 284 | 285 | 288 | 289 |
286 | {{ config('app.name') }} 287 |
290 |
291 | 295 |
298 |
299 |
303 |
304 | 305 | 306 | 309 | 310 | 311 | 314 | 315 | 316 | 325 | 326 | 327 | 371 | 372 |
307 | Thank you for contacting us! 308 |
312 | Our support team will reach you in a few days 313 |
317 | 324 |
328 | 329 | 330 | 350 | 368 | 369 |
331 | 332 | 333 | 347 | 348 |
334 | 335 | 336 | 344 | 345 |
337 | Your details
338 | {{ ucfirst($user->name) }}
339 | {{ $user->email }}
340 |
341 | Ticket ID
342 | #{{ $ticket->ticket_id }}
343 |
346 |
349 |
351 | 352 | 353 | 365 | 366 |
354 | 355 | 356 | 362 | 363 |
357 | Ticket details
358 | Title: {{ $ticket->title }}
359 | Priority: {{ ucfirst($ticket->priority) }}
360 | Status: {{ $ticket->status }} 361 |
364 |
367 |
370 |
373 |
374 |
378 |
379 | 380 | 381 | 384 | 385 |
382 | {{ config('app.name') }}
383 |
386 |
387 |
390 |
391 | 392 | 393 | -------------------------------------------------------------------------------- /resources/views/mail/ticket_comments.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Ticket #{{ $ticket->ticket_id }} opened 7 | 8 | 173 | 174 | 177 | 178 | 186 | 187 | 266 | 267 | 268 | 269 | 270 | 271 | 300 | 301 | 302 | 375 | 376 | 377 | 388 | 389 |
272 |
273 | 274 | 275 | 276 | 296 | 297 |
277 | 282 |
283 | 284 | 285 | 288 | 289 |
286 | {{ config('app.name') }} 287 |
290 |
291 | 295 |
298 |
299 |
303 |
304 | 305 | 306 | 309 | 310 | 311 | 314 | 315 | 316 | 325 | 326 | 327 | 371 | 372 |
307 | Ticket Answered 308 |
312 | {{ ucfirst($comment->user->name) }} has replied to #{{ $ticket->id }} 313 |
317 | 324 |
328 | 329 | 330 | 350 | 368 | 369 |
331 | 332 | 333 | 347 | 348 |
334 | 335 | 336 | 344 | 345 |
337 | Your details
338 | {{ ucfirst($user->name) }}
339 | {{ $user->email }}
340 |
341 | Ticket ID
342 | #{{ $ticket->ticket_id }}
343 |
346 |
349 |
351 | 352 | 353 | 365 | 366 |
354 | 355 | 356 | 362 | 363 |
357 | Ticket details
358 | Title: {{ $ticket->title }}
359 | Priority: {{ ucfirst($ticket->priority) }}
360 | Status: {{ $ticket->status }} 361 |
364 |
367 |
370 |
373 |
374 |
378 |
379 | 380 | 381 | 384 | 385 |
382 | {{ config('app.name') }}
383 |
386 |
387 |
390 | 391 | 392 | 393 | -------------------------------------------------------------------------------- /resources/views/mail/ticket_status.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Ticket #{{ $ticket->ticket_id }} opened 7 | 8 | 173 | 174 | 177 | 178 | 186 | 187 | 266 | 267 | 268 | 269 | 270 | 271 | 300 | 301 | 302 | 375 | 376 | 377 | 388 | 389 |
272 |
273 | 274 | 275 | 276 | 296 | 297 |
277 | 282 |
283 | 284 | 285 | 288 | 289 |
286 | {{ config('app.name') }} 287 |
290 |
291 | 295 |
298 |
299 |
303 |
304 | 305 | 306 | 309 | 310 | 311 | 314 | 315 | 316 | 325 | 326 | 327 | 371 | 372 |
307 | Ticket status changed 308 |
312 | Your ticket #{{ $ticket->ticket_id }} has marked as {{ $ticket->status }}. 313 |
317 | 324 |
328 | 329 | 330 | 350 | 368 | 369 |
331 | 332 | 333 | 347 | 348 |
334 | 335 | 336 | 344 | 345 |
337 | Your details
338 | {{ ucfirst($user->name) }}
339 | {{ $user->email }}
340 |
341 | Ticket ID
342 | #{{ $ticket->ticket_id }}
343 |
346 |
349 |
351 | 352 | 353 | 365 | 366 |
354 | 355 | 356 | 362 | 363 |
357 | Ticket details
358 | Title: {{ $ticket->title }}
359 | Priority: {{ ucfirst($ticket->priority) }}
360 | Status: {{ $ticket->status }} 361 |
364 |
367 |
370 |
373 |
374 |
378 |
379 | 380 | 381 | 384 | 385 |
382 | {{ config('app.name') }}
383 |
386 |
387 |
390 | 391 | 392 | 393 | --------------------------------------------------------------------------------