Skip to content

Commit

Permalink
Recipe 201
Browse files Browse the repository at this point in the history
  • Loading branch information
LearningLaravel committed Feb 1, 2017
1 parent 1d7486f commit c8232b1
Show file tree
Hide file tree
Showing 37 changed files with 1,668 additions and 5 deletions.
2 changes: 2 additions & 0 deletions app/Http/Controllers/PagesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Alert;

class PagesController extends Controller
{
public function home()
{
Alert::error('There is an error', 'Error')->autoclose(2000);
return view('home');
}

Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"intervention/image": "^2.3",
"laravel/framework": "5.4.*",
"laravel/socialite": "^3.0",
"laravel/tinker": "~1.0"
"laravel/tinker": "~1.0",
"uxweb/sweet-alert": "^1.4"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
Expand Down
55 changes: 53 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
App\Providers\RouteServiceProvider::class,
Laravel\Socialite\SocialiteServiceProvider::class,
Intervention\Image\ImageServiceProvider::class,
UxWeb\SweetAlert\SweetAlertServiceProvider::class,

],

Expand Down Expand Up @@ -229,7 +230,7 @@
'View' => Illuminate\Support\Facades\View::class,
'Socialite' => Laravel\Socialite\Facades\Socialite::class,
'Image' => Intervention\Image\Facades\Image::class,

'Alert' => UxWeb\SweetAlert\SweetAlert::class,
],

];
10 changes: 10 additions & 0 deletions config/sweet-alert.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

return [
/*
* This sets the global autoclose for all alerts.
* If you want to change a specific alert chain ->autoclose(milliseconds) on the end.
*/
'autoclose' => 1800,

];
Loading

0 comments on commit c8232b1

Please sign in to comment.