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 | |
namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
use Illuminate\View\View; | |
use Illuminate\Http\RedirectResponse; | |
use App\User; | |
class UserController extends Controller |
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
Route::group(['middleware' => 'auth'], function () { | |
Route::get('password', 'PasswordController@change')->name('password.change'); | |
Route::put('password', 'PasswordController@update')->name('password.update'); | |
}); |
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
@extends('layouts.app') | |
@section('content') | |
<div class="container"> | |
<div class="row"> | |
<div class="col-md-8 col-md-offset-2"> | |
<div class="panel panel-default"> | |
<div class="panel-heading">Change Password</div> | |
<div class="panel-body"> | |
@if (session()->has('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
Field Type Collation Null Key Default Extra Privileges Comment | |
-------------- ---------------- --------------- ------ ------ ------- -------------- ------------------------------- --------- | |
id int(10) unsigned (NULL) NO PRI (NULL) auto_increment select,insert,update,references | |
name varchar(255) utf8_unicode_ci NO MUL (NULL) select,insert,update,references | |
email varchar(255) utf8_unicode_ci NO UNI (NULL) select,insert,update,references | |
birthplace varchar(50) utf8_unicode_ci YES (NULL) select,insert,update,references | |
birthdate date (NULL) YES (NULL) select,insert,update,references | |
gender enum('m','f') utf8_unicode_ci NO m |
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 | |
use Illuminate\Database\Migrations\Migration; | |
use Illuminate\Database\Schema\Blueprint; | |
class CreateUsersTable extends Migration { | |
/** | |
* Run the migrations. | |
* |
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 | |
// app/Providers/RouteServiceProvider.php | |
namespace App\Providers; | |
use Illuminate\Support\Facades\Route; | |
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; | |
class RouteServiceProvider extends ServiceProvider |
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('curl_init')) { | |
die('cURL library is not installed.'); | |
} | |
$curl = curl_init('http://api.glosarium.web.id?'); | |
curl_setop($curl, CURLOPT_RETURNTRANSFER, true); |
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
<VirtualHost *:80> | |
# The ServerName directive sets the request scheme, hostname and port that | |
# the server uses to identify itself. This is used when creating | |
# redirection URLs. In the context of virtual hosts, the ServerName | |
# specifies what hostname must appear in the request's Host: header to | |
# match this virtual host. For the default virtual host (this file) this | |
# value is not decisive as it is used as a last resort host regardless. | |
# However, you must set it for any further virtual host explicitly. | |
#ServerName www.example.com |
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 | |
namespace App\Http\Controllers\Auth; | |
use App\Http\Controllers\Controller; | |
use Illuminate\Foundation\Auth\AuthenticatesUsers; | |
use Illuminate\Http\Request; | |
class LoginController extends Controller |
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 | |
/** | |
* Simple chained method in PHP | |
* | |
* @link http://laravel.web.id/tips-trik/membuat-fungsi-berantai-chained-methodfunction-di-php/ | |
* @copyright 2016 | |
*/ | |
class User { |
NewerOlder