Update to laravel 7.6, darken the dashboard modal, and use links for the dashboard edit buttons instead of javascript

This commit is contained in:
Kevin MacMartin 2020-04-23 22:17:13 -04:00
parent 0bcd385fa7
commit bf1b3ea9aa
32 changed files with 976 additions and 644 deletions

View file

@ -30,7 +30,7 @@ REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null REDIS_PASSWORD=null
REDIS_PORT=6379 REDIS_PORT=6379
MAIL_DRIVER=smtp MAIL_MAILER=smtp
MAIL_HOST=null MAIL_HOST=null
MAIL_PORT=587 MAIL_PORT=587
MAIL_USERNAME=null MAIL_USERNAME=null

View file

@ -1 +1 @@
9d0862b3340c8243ee072afc181e315ffa35e110 b5f008a8bff29219800b465e613bc19a191ac815

View file

@ -24,8 +24,7 @@ class Kernel extends ConsoleKernel
*/ */
protected function schedule(Schedule $schedule) protected function schedule(Schedule $schedule)
{ {
// $schedule->command('inspire') // $schedule->command('inspire')->hourly();
// ->hourly();
} }
/** /**

View file

@ -2,8 +2,8 @@
namespace App\Exceptions; namespace App\Exceptions;
use Exception;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Throwable;
class Handler extends ExceptionHandler class Handler extends ExceptionHandler
{ {
@ -29,12 +29,12 @@ class Handler extends ExceptionHandler
/** /**
* Report or log an exception. * Report or log an exception.
* *
* @param \Exception $exception * @param \Throwable $exception
* @return void * @return void
* *
* @throws \Exception * @throws \Exception
*/ */
public function report(Exception $exception) public function report(Throwable $exception)
{ {
parent::report($exception); parent::report($exception);
} }
@ -43,12 +43,12 @@ class Handler extends ExceptionHandler
* Render an exception into an HTTP response. * Render an exception into an HTTP response.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param \Exception $exception * @param \Throwable $exception
* @return \Symfony\Component\HttpFoundation\Response * @return \Symfony\Component\HttpFoundation\Response
* *
* @throws \Exception * @throws \Throwable
*/ */
public function render($request, Exception $exception) public function render($request, Throwable $exception)
{ {
return parent::render($request, $exception); return parent::render($request, $exception);
} }

View file

@ -15,6 +15,7 @@ class Kernel extends HttpKernel
*/ */
protected $middleware = [ protected $middleware = [
\App\Http\Middleware\TrustProxies::class, \App\Http\Middleware\TrustProxies::class,
\Fruitcake\Cors\HandleCors::class,
\App\Http\Middleware\CheckForMaintenanceMode::class, \App\Http\Middleware\CheckForMaintenanceMode::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class, \App\Http\Middleware\TrimStrings::class,
@ -62,21 +63,4 @@ class Kernel extends HttpKernel
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
]; ];
/**
* The priority-sorted list of middleware.
*
* This forces non-global middleware to always be in the given order.
*
* @var array
*/
protected $middlewarePriority = [
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\Authenticate::class,
\Illuminate\Routing\Middleware\ThrottleRequests::class,
\Illuminate\Session\Middleware\AuthenticateSession::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
\Illuminate\Auth\Middleware\Authorize::class,
];
} }

View file

@ -6,13 +6,6 @@ use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware class VerifyCsrfToken extends Middleware
{ {
/**
* Indicates whether the XSRF-TOKEN cookie should be set on the response.
*
* @var bool
*/
protected $addHttpCookie = true;
/** /**
* The URIs that should be excluded from CSRF verification. * The URIs that should be excluded from CSRF verification.
* *

View file

@ -59,8 +59,8 @@ class RouteServiceProvider extends ServiceProvider
protected function mapWebRoutes() protected function mapWebRoutes()
{ {
Route::middleware('web') Route::middleware('web')
->namespace($this->namespace) ->namespace($this->namespace)
->group(base_path('routes/web.php')); ->group(base_path('routes/web.php'));
} }
/** /**
@ -73,8 +73,8 @@ class RouteServiceProvider extends ServiceProvider
protected function mapApiRoutes() protected function mapApiRoutes()
{ {
Route::prefix('api') Route::prefix('api')
->middleware('api') ->middleware('api')
->namespace($this->namespace) ->namespace($this->namespace)
->group(base_path('routes/api.php')); ->group(base_path('routes/api.php'));
} }
} }

View file

@ -8,24 +8,27 @@
], ],
"license": "MIT", "license": "MIT",
"require": { "require": {
"php": "^7.2", "php": "^7.2.5",
"doctrine/dbal": "^2.6", "doctrine/dbal": "^2.10",
"erusev/parsedown": "~1.6", "erusev/parsedown": "~1.7",
"fideloper/proxy": "^4.0", "fideloper/proxy": "^4.2",
"intervention/image": "^2.4", "fruitcake/laravel-cors": "^1.0",
"laravel/framework": "^6.2", "guzzlehttp/guzzle": "^6.3",
"laravel/helpers": "^1.1", "intervention/image": "^2.5",
"laravel/framework": "^7.0",
"laravel/helpers": "^1.2",
"laravel/tinker": "^2.0", "laravel/tinker": "^2.0",
"laravel/ui": "^2.0",
"phpoffice/phpspreadsheet": "^1.2", "phpoffice/phpspreadsheet": "^1.2",
"radic/blade-extensions": "~7.3", "radic/blade-extensions": "dev-master",
"spatie/laravel-newsletter": "^4.6" "spatie/laravel-newsletter": "^4.8"
}, },
"require-dev": { "require-dev": {
"facade/ignition": "^1.4", "facade/ignition": "^2.0",
"fzaninotto/faker": "^1.4", "fzaninotto/faker": "^1.9.1",
"mockery/mockery": "^1.0", "mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^3.0", "nunomaduro/collision": "^4.1",
"phpunit/phpunit": "^8.0" "phpunit/phpunit": "^8.5"
}, },
"config": { "config": {
"optimize-autoloader": true, "optimize-autoloader": true,

1270
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -39,7 +39,7 @@ return [
| |
*/ */
'debug' => env('APP_DEBUG', false), 'debug' => (bool) env('APP_DEBUG', false),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -214,6 +214,7 @@ return [
'File' => Illuminate\Support\Facades\File::class, 'File' => Illuminate\Support\Facades\File::class,
'Gate' => Illuminate\Support\Facades\Gate::class, 'Gate' => Illuminate\Support\Facades\Gate::class,
'Hash' => Illuminate\Support\Facades\Hash::class, 'Hash' => Illuminate\Support\Facades\Hash::class,
'Http' => Illuminate\Support\Facades\Http::class,
'Lang' => Illuminate\Support\Facades\Lang::class, 'Lang' => Illuminate\Support\Facades\Lang::class,
'Log' => Illuminate\Support\Facades\Log::class, 'Log' => Illuminate\Support\Facades\Log::class,
'Mail' => Illuminate\Support\Facades\Mail::class, 'Mail' => Illuminate\Support\Facades\Mail::class,

View file

@ -39,6 +39,7 @@ return [
'array' => [ 'array' => [
'driver' => 'array', 'driver' => 'array',
'serialize' => false,
], ],
'database' => [ 'database' => [

34
config/cors.php Normal file
View file

@ -0,0 +1,34 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Cross-Origin Resource Sharing (CORS) Configuration
|--------------------------------------------------------------------------
|
| Here you may configure your settings for cross-origin resource sharing
| or "CORS". This determines what cross-origin operations may execute
| in web browsers. You are free to adjust these settings as needed.
|
| To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
|
*/
'paths' => ['api/*'],
'allowed_methods' => ['*'],
'allowed_origins' => ['*'],
'allowed_origins_patterns' => [],
'allowed_headers' => ['*'],
'exposed_headers' => [],
'max_age' => 0,
'supports_credentials' => false,
];

View file

@ -62,8 +62,24 @@ return [
'region' => env('AWS_DEFAULT_REGION'), 'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'), 'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'), 'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
], ],
], ],
/*
|--------------------------------------------------------------------------
| Symbolic Links
|--------------------------------------------------------------------------
|
| Here you may configure the symbolic links that will be created when the
| `storage:link` Artisan command is executed. The array keys should be
| the locations of the links and the values should be their targets.
|
*/
'links' => [
public_path('storage') => storage_path('app/public'),
],
]; ];

View file

@ -4,45 +4,72 @@ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Mail Driver | Default Mailer
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Laravel supports both SMTP and PHP's "mail" function as drivers for the | This option controls the default mailer that is used to send any email
| sending of e-mail. You may specify which one you're using throughout | messages sent by your application. Alternative mailers may be setup
| your application here. By default, Laravel is setup for SMTP mail. | and used as needed; however, this mailer will be used by default.
|
*/
'default' => env('MAIL_MAILER', 'smtp'),
/*
|--------------------------------------------------------------------------
| Mailer Configurations
|--------------------------------------------------------------------------
|
| Here you may configure all of the mailers used by your application plus
| their respective settings. Several examples have been configured for
| you and you are free to add your own as your application requires.
|
| Laravel supports a variety of mail "transport" drivers to be used while
| sending an e-mail. You will specify which one you are using for your
| mailers below. You are free to add additional mailers as required.
| |
| Supported: "smtp", "sendmail", "mailgun", "ses", | Supported: "smtp", "sendmail", "mailgun", "ses",
| "postmark", "log", "array" | "postmark", "log", "array"
| |
*/ */
'driver' => env('MAIL_DRIVER', 'smtp'), 'mailers' => [
'smtp' => [
'transport' => 'smtp',
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
'port' => env('MAIL_PORT', 587),
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'timeout' => null,
],
/* 'ses' => [
|-------------------------------------------------------------------------- 'transport' => 'ses',
| SMTP Host Address ],
|--------------------------------------------------------------------------
|
| Here you may provide the host address of the SMTP server used by your
| applications. A default option is provided that is compatible with
| the Mailgun mail service which will provide reliable deliveries.
|
*/
'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 'mailgun' => [
'transport' => 'mailgun',
],
/* 'postmark' => [
|-------------------------------------------------------------------------- 'transport' => 'postmark',
| SMTP Host Port ],
|--------------------------------------------------------------------------
|
| This is the SMTP port used by your application to deliver e-mails to
| users of the application. Like the host we have set this value to
| stay compatible with the Mailgun e-mail application by default.
|
*/
'port' => env('MAIL_PORT', 587), 'sendmail' => [
'transport' => 'sendmail',
'path' => '/usr/sbin/sendmail -bs',
],
'log' => [
'transport' => 'log',
'channel' => env('MAIL_LOG_CHANNEL'),
],
'array' => [
'transport' => 'array',
],
],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -60,47 +87,6 @@ return [
'name' => env('MAIL_FROM_NAME', null), 'name' => env('MAIL_FROM_NAME', null),
], ],
/*
|--------------------------------------------------------------------------
| E-Mail Encryption Protocol
|--------------------------------------------------------------------------
|
| Here you may specify the encryption protocol that should be used when
| the application send e-mail messages. A sensible default using the
| transport layer security protocol should provide great security.
|
*/
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
/*
|--------------------------------------------------------------------------
| SMTP Server Username
|--------------------------------------------------------------------------
|
| If your SMTP server requires a username for authentication, you should
| set it here. This will get used to authenticate with your server on
| connection. You may also set the "password" value below this one.
|
*/
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
/*
|--------------------------------------------------------------------------
| Sendmail System Path
|--------------------------------------------------------------------------
|
| When using the "sendmail" driver to send e-mails, we will need to know
| the path to where Sendmail lives on this server. A default path has
| been provided here, which will work well on most of your systems.
|
*/
'sendmail' => '/usr/sbin/sendmail -bs',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Markdown Mail Settings | Markdown Mail Settings
@ -120,17 +106,4 @@ return [
], ],
], ],
/*
|--------------------------------------------------------------------------
| Log Channel
|--------------------------------------------------------------------------
|
| If you are using the "log" driver, you may specify the logging channel
| if you prefer to keep mail messages separate from other log entries
| for simpler reading. Otherwise, the default channel will be used.
|
*/
'log_channel' => env('MAIL_LOG_CHANNEL'),
]; ];

View file

@ -55,6 +55,7 @@ return [
'secret' => env('AWS_SECRET_ACCESS_KEY'), 'secret' => env('AWS_SECRET_ACCESS_KEY'),
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
'queue' => env('SQS_QUEUE', 'your-queue-name'), 'queue' => env('SQS_QUEUE', 'your-queue-name'),
'suffix' => env('SQS_SUFFIX'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
], ],

View file

@ -166,7 +166,7 @@ return [
| |
*/ */
'secure' => env('SESSION_SECURE_COOKIE', false), 'secure' => env('SESSION_SECURE_COOKIE'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -188,12 +188,12 @@ return [
| |
| This option determines how your cookies behave when cross-site requests | This option determines how your cookies behave when cross-site requests
| take place, and can be used to mitigate CSRF attacks. By default, we | take place, and can be used to mitigate CSRF attacks. By default, we
| do not enable this as other CSRF protection services are in place. | will set this value to "lax" since this is a secure default value.
| |
| Supported: "lax", "strict", "none" | Supported: "lax", "strict", "none", null
| |
*/ */
'same_site' => null, 'same_site' => 'lax',
]; ];

View file

@ -14,7 +14,7 @@ class CreateUsersTable extends Migration
public function up() public function up()
{ {
Schema::create('users', function(Blueprint $table) { Schema::create('users', function(Blueprint $table) {
$table->bigIncrements('id'); $table->id();
$table->string('email')->unique(); $table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable(); $table->timestamp('email_verified_at')->nullable();
$table->string('name'); $table->string('name');

View file

@ -14,7 +14,7 @@ class AddContactTable extends Migration
public function up() public function up()
{ {
Schema::create('contact', function(Blueprint $table) { Schema::create('contact', function(Blueprint $table) {
$table->bigIncrements('id'); $table->id();
$table->string('name')->nullable(); $table->string('name')->nullable();
$table->string('email')->nullable(); $table->string('email')->nullable();
$table->text('message')->nullable(); $table->text('message')->nullable();

View file

@ -14,7 +14,7 @@ class AddSubscriptionTable extends Migration
public function up() public function up()
{ {
Schema::create('subscriptions', function(Blueprint $table) { Schema::create('subscriptions', function(Blueprint $table) {
$table->bigIncrements('id'); $table->id();
$table->string('name')->nullable(); $table->string('name')->nullable();
$table->string('email')->nullable(); $table->string('email')->nullable();
$table->timestamps(); $table->timestamps();

View file

@ -14,7 +14,7 @@ class AddBlogTable extends Migration
public function up() public function up()
{ {
Schema::create('blog', function(Blueprint $table) { Schema::create('blog', function(Blueprint $table) {
$table->bigIncrements('id'); $table->id();
$table->bigInteger('user_id')->unsigned(); $table->bigInteger('user_id')->unsigned();
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
$table->string('title')->nullable(); $table->string('title')->nullable();

View file

@ -14,7 +14,7 @@ class CreateFailedJobsTable extends Migration
public function up() public function up()
{ {
Schema::create('failed_jobs', function (Blueprint $table) { Schema::create('failed_jobs', function (Blueprint $table) {
$table->bigIncrements('id'); $table->id();
$table->text('connection'); $table->text('connection');
$table->text('queue'); $table->text('queue');
$table->longText('payload'); $table->longText('payload');

View file

@ -1,20 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd" xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php" bootstrap="vendor/autoload.php"
colors="true" colors="true"
convertErrorsToExceptions="true" >
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites> <testsuites>
<testsuite name="Unit"> <testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory> <directory suffix="Test.php">./tests/Unit</directory>
</testsuite> </testsuite>
<testsuite name="Feature"> <testsuite name="Feature">
<directory suffix="Test.php">./tests/Feature</directory> <directory suffix="Test.php">./tests/Feature</directory>
</testsuite> </testsuite>
@ -30,8 +23,9 @@
<server name="CACHE_DRIVER" value="array"/> <server name="CACHE_DRIVER" value="array"/>
<server name="DB_CONNECTION" value="sqlite"/> <server name="DB_CONNECTION" value="sqlite"/>
<server name="DB_DATABASE" value=":memory:"/> <server name="DB_DATABASE" value=":memory:"/>
<server name="MAIL_DRIVER" value="array"/> <server name="MAIL_MAILER" value="array"/>
<server name="QUEUE_CONNECTION" value="sync"/> <server name="QUEUE_CONNECTION" value="sync"/>
<server name="SESSION_DRIVER" value="array"/> <server name="SESSION_DRIVER" value="array"/>
<server name="TELESCOPE_ENABLED" value="false"/>
</php> </php>
</phpunit> </phpunit>

View file

@ -14,7 +14,7 @@
RewriteCond %{REQUEST_URI} (.+)/$ RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301] RewriteRule ^ %1 [L,R=301]
# Handle Front Controller... # Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L] RewriteRule ^ index.php [L]

View file

@ -3,7 +3,7 @@
A Hypothetical website template for bootstrapping new projects. A Hypothetical website template for bootstrapping new projects.
* Written and maintained by Kevin MacMartin * Written and maintained by Kevin MacMartin
* Based on Laravel 6.12.0 * Based on Laravel 7.6.0
## Setup ## Setup

View file

@ -160,20 +160,6 @@ function editListInit() {
}); });
}; };
// initialize edit button functionality
const editButtonInit = function() {
const $editButtons = $(".btn.edit-button");
$editButtons.on("click", function() {
const $this = $(this),
$listItem = $this.closest(".list-group-item"),
itemId = $listItem.data("id");
// go to the edit page
window.location.href = "/dashboard/edit/" + model + "/" + itemId;
});
};
// initialize delete button functionality // initialize delete button functionality
const deleteButtonInit = function() { const deleteButtonInit = function() {
const $deleteButtons = $(".btn.delete-button"); const $deleteButtons = $(".btn.delete-button");
@ -244,6 +230,7 @@ function editListInit() {
sortable = Sortable.create(editList, { sortable = Sortable.create(editList, {
handle: ".sort-icon", handle: ".sort-icon",
onUpdate: function() { onUpdate: function() {
// update the sortOrder object based on the updated order // update the sortOrder object based on the updated order
$editList.find(".list-group-item").reverse().each(function(index) { $editList.find(".list-group-item").reverse().each(function(index) {
@ -296,7 +283,6 @@ function editListInit() {
}; };
newButtonInit(); newButtonInit();
editButtonInit();
deleteButtonInit(); deleteButtonInit();
actionButtonInit(); actionButtonInit();
sortRowInit(); sortRowInit();

View file

@ -14,9 +14,9 @@ return [
*/ */
'reset' => 'Your password has been reset!', 'reset' => 'Your password has been reset!',
'sent' => 'We have e-mailed your password reset link!', 'sent' => 'We have emailed your password reset link!',
'throttled' => 'Please wait before retrying.', 'throttled' => 'Please wait before retrying.',
'token' => 'This password reset token is invalid.', 'token' => 'This password reset token is invalid.',
'user' => "We can't find a user with that e-mail address.", 'user' => "We can't find a user with that email address.",
]; ];

View file

@ -744,11 +744,11 @@ form {
} }
} }
.text-display, .mkd-editor-container, input, select { .text-display, .mkd-editor-container, input, textarea, select {
margin-bottom: 15px; margin-bottom: 15px;
} }
input { input, textarea {
display: block; display: block;
width: 100%; width: 100%;
@ -775,6 +775,14 @@ form {
} }
} }
textarea {
resize: none;
}
select {
max-width: 100%;
}
.current-image { .current-image {
margin-bottom: 15px; margin-bottom: 15px;
display: block; display: block;
@ -1008,7 +1016,7 @@ form {
padding: $grid-gutter-width; padding: $grid-gutter-width;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background-color: fade-out(lighten($c-dashboard-light, 1%), 0.6); background-color: fade-out(lighten($c-dashboard-light, 1%), 0.3);
opacity: 0; opacity: 0;
transition: opacity 250ms; transition: opacity 250ms;

View file

@ -48,7 +48,7 @@
<button type="button" class="action-button btn btn-secondary" data-confirmation="{{ $button[1] }}" data-success="{{ $button[2] }}" data-error="{{ $button[3] }}" data-url="{{ $button[4] }}">{{ $button[0] }}</button> <button type="button" class="action-button btn btn-secondary" data-confirmation="{{ $button[1] }}" data-success="{{ $button[2] }}" data-error="{{ $button[3] }}" data-url="{{ $button[4] }}">{{ $button[0] }}</button>
@endif @endif
<button type="button" class="edit-button btn btn-warning">Edit</button> <a class="edit-button btn btn-warning" href="/dashboard/edit/{{ $model }}/{{ $row['id'] }}">Edit</a>
@if($delete) @if($delete)
<button type="button" class="delete-button btn btn-danger">Delete</button> <button type="button" class="delete-button btn btn-danger">Delete</button>

View file

@ -1,6 +1,7 @@
<?php <?php
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------

View file

@ -1,5 +1,7 @@
<?php <?php
use Illuminate\Support\Facades\Broadcast;
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Broadcast Channels | Broadcast Channels

View file

@ -1,6 +1,7 @@
<?php <?php
use Illuminate\Foundation\Inspiring; use Illuminate\Foundation\Inspiring;
use Illuminate\Support\Facades\Artisan;
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------

View file

@ -1,5 +1,6 @@
<?php <?php
use Illuminate\Support\Facades\Route;
use App\Dashboard; use App\Dashboard;
use App\Utilities\Language; use App\Utilities\Language;