This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (! function_exists('untrailingslashit')) { | |
function untrailingslashit( $string ) | |
{ | |
return rtrim( $string, '/\\' ); | |
} | |
} | |
if (! function_exists('trailingslashit')) { | |
function trailingslashit( $string ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class My_Widget extends WP_Widget { | |
/** | |
* Sets up the widgets name etc | |
*/ | |
public function __construct() { | |
$widget_ops = array( | |
'classname' => 'my_widget', | |
'description' => 'My Widget is awesome', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Change this /path if you load assets from local | |
* example 'css' => asset('/css/app.css'), | |
*/ | |
return [ | |
'css' => 'https://cdnjs.cloudflare.com/ajax/libs/izitoast/1.1.5/css/iziToast.min.css', | |
'js' => 'https://cdnjs.cloudflare.com/ajax/libs/izitoast/1.1.5/js/iziToast.min.js' | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @link https://www.onphpid.com/membuat-alert-message-yang-lebih-menarik-di-laravel.html | |
*/ | |
return [ | |
'success' => [ | |
'type' => 'success', | |
'title' => 'Hi...', | |
'message' => 'FlashMe is Ready!', | |
'options' => [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Routing | |
*/ | |
Route::get('/', function(){ | |
return view('welcome'); | |
}); | |
Route::get('/flash-me', function(){ | |
flashMe()->success(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@if ( flashMe()->ok() ) | |
{!! flashMe_flash() !!} | |
@endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//..... | |
Route::get('/flash-me', function(){ | |
flashMe()->success(); | |
dd(session()->all()); // dump | |
return redirect()->to('/'); | |
}); | |
//.... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//... | |
public function store(Request $request) | |
{ | |
$save = false; | |
if ( $save ) { | |
flashMe()->success(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//... | |
'providers'=>[ | |
Ken\FlashMe\FlashMeServiceProvider::class, | |
] | |
//... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Datatable Server Side</title> | |
</head> | |
<body> | |
<table id="example" class="display" cellspacing="0" width="100%"> | |
<thead> | |
<tr> | |
<th>First Name</th> | |
<th>Last Name</th> |