Commit 1a8ffe37 by Rinto

Admin-User Add

parent d085c07a
...@@ -27,6 +27,6 @@ MAIL_USERNAME=null ...@@ -27,6 +27,6 @@ MAIL_USERNAME=null
MAIL_PASSWORD=null MAIL_PASSWORD=null
MAIL_ENCRYPTION=null MAIL_ENCRYPTION=null
PUSHER_APP_ID=
PUSHER_KEY= PUSHER_KEY=
PUSHER_SECRET= PUSHER_SECRET=
PUSHER_APP_ID=
/node_modules /node_modules
/public/storage /public/storage
/storage/*.key
/vendor /vendor
/.idea /.idea
Homestead.json Homestead.json
......
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Input;
use File;
use App\Http\Requests;
use App\Models\Bus;
use App\Models\Users;
use App\Models\Supir;
use App\Models\Pemesanan;
use Validator;
use App\Http\Controllers\Controller;
use App\User;
use Image;
class AdminController extends Controller
{
public function store(Request $request){
$this->validate($request, [
'image' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',
]);
$input = $request->all();
$image = $request->file('image');
$input['image'] = time().'.'.$image->getClientOriginalExtension();
$destinationPath = public_path('/image');
$img = Image::make($image->getRealPath());
$img->resize(300, 300, function ($constraint) {
$constraint->aspectRatio();
})->save($destinationPath.'/'.$input['image']);
if($username = DB::table('users')->where('username' , $input['username'])->first()){
return redirect()->back()->with('info','We are so sorry :( .Username is exists. Please choose another username');
}else{
User::create(['username' => $input['username'],'password' => bcrypt($input['password']),'role' => $input['role'],'image' => $input['image']])->id;
return redirect(url('/admin/user'))->with('info','Data User Berhasil ditambah');
}
}
public function user(){
$key = Input::get('search');
$this->data['title'] = 'List User';
if(isset($key)){
$this->data['user'] = User::where('username','like','%'.$key.'%','and','role','!=','supir')->orderBy('id','desc')->paginate(10);
}else{
$this->data['user'] = User::where('role','!=','supir')->orderBy('id','desc')->paginate(10);
}
$this->data['total'] = DB::table('users')->where('role','!=','supir')->get();
return view('admin.user.index',$this->data);
}
public function tambahuser(){
$this->data['title'] = 'Tambah User';
return view('admin.user.tambah',$this->data);
}
public function hapususer($id){
User::find($id)->delete();
return redirect(url('/admin/user'))->with('info','Data User berhasil dihapus');
}
public function bus(){
$key = Input::get('search');
$this->data['title'] = 'Bus IT Del';
if(isset($key)){
$this->data['bus'] = Bus::where('nama_bus','like','%'.$key.'%')->orderBy('id','desc')->paginate(10);
}else{
$this->data['bus'] = Bus::orderBy('id','desc')->paginate(10);
}
$this->data['total'] = DB::table('bus')->get();
return view('admin.bus.index',$this->data);
}
public function tambahbus(){
$this->data['title'] = 'Tambah Bus';
return view('admin.bus.tambah',$this->data);
}
public function storebus(Request $request){
$this->validate($request, [
'image' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',
]);
$input = $request->all();
$image = $request->file('image');
$input['image'] = time().'.'.$image->getClientOriginalExtension();
$destinationPath = public_path('/image');
$img = Image::make($image->getRealPath());
$img->resize(300, 300, function ($constraint) {
$constraint->aspectRatio();
})->save($destinationPath.'/'.$input['image']);
if($plat_bus = DB::table('bus')->where('plat_bus' , $input['plat_bus'])->first()){
return redirect()->back()->with('info','We are so sorry :( .Plat Bus is exists. Please choose another Plat Bus');
}else{
Bus::create($input);
return redirect(url('/admin/bus'))->with('info','Data Bus berhasil ditambah');
}
}
public function hapusbus($id){
$bus = DB::table('bus')->where('id' , $id)->first();
File::delete('image/' . $bus->image);
Bus::find($id)->delete();
return redirect(url('/admin/bus'))->with('info','Bus berhasil dihapus');
}
public function detail($id){
$this->data['title'] = 'Detail Bus';
$this->data['bus'] = Bus::find($id);
return view('admin.bus.detail',$this->data);
}
public function ubah($id){
$this->data['title'] = 'Ubah Data Bus';
$this->data['bus'] = Bus::find($id);
return view('admin.bus.ubah',$this->data);
}
public function edit(Request $request, $id){
// code : from itsolutionstuff.com and modified by group 9 using intervention image
$input = $request->all();
if($request->file('image')){
$this->validate($request, [
'image' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048',
]);
$bus = DB::table('bus')->where('id' , $id)->first();
File::delete('image/' . $bus->image);
$image = $request->file('image');
$input['image'] = time().'.'.$image->getClientOriginalExtension();
$destinationPath = public_path('/image');
$img = Image::make($image->getRealPath());
$img->resize(300, 300, function ($constraint) {
$constraint->aspectRatio();
})->save($destinationPath.'/'.$input['image']);
Bus::find($id)->update($input);
}
else{
Bus::find($id)->update($input);
}
return redirect(url('/admin/bus'))->with('info','Data Bus Berhasil di Ubah');
}
public function supir(){
$key = Input::get('search');
$this->data['title'] = 'Supir IT Del';
if(isset($key)){
$this->data['supir'] = Supir::where('nama_bus','like','%'.$key.'%')->orderBy('id','desc')->paginate(10);
}else{
$this->data['supir'] = Supir::orderBy('id','desc')->paginate(10);
}
$this->data['total'] = DB::table('supir')->get();
return view('admin.supir.index',$this->data);
}
public function tambahsupir(){
$this->data['title'] = 'Tambah Supir';
return view('admin.supir.tambah',$this->data);
}
public function storesupir(Request $request){
$this->validate($request, [
'image' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',
]);
$input = $request->all();
$image = $request->file('image');
$input['image'] = time().'.'.$image->getClientOriginalExtension();
$destinationPath = public_path('/image');
$img = Image::make($image->getRealPath());
$img->resize(300, 300, function ($constraint) {
$constraint->aspectRatio();
})->save($destinationPath.'/'.$input['image']);
if($id = DB::table('supir')->where('id' , $input['id'])->first()){
return redirect()->back()->with('info','We are so sorry :( .ID is exists. Please choose another ID');
}else{
Supir::create($input);
return redirect(url('/admin/supir'))->with('info','Data Supir berhasil ditambah');
}
}
public function hapussupir($id){
$supir = DB::table('supir')->where('id' , $id)->first();
File::delete('image/' . $supir->image);
Supir::find($id)->delete();
return redirect(url('/admin/supir'))->with('info','Supir berhasil dihapus');
}
public function detailsupir($id){
$this->data['title'] = 'Detail Supir';
$this->data['supir'] = Supir::find($id);
return view('admin.supir.detail',$this->data);
}
public function ubahsupir($id){
$this->data['title'] = 'Ubah Data Supir';
$this->data['supir'] = Supir::find($id);
return view('admin.supir.ubahsupir',$this->data);
}
public function editsupir(Request $request, $id){
// code : from itsolutionstuff.com and modified by group 9 using intervention image
$input = $request->all();
if($request->file('image')){
$this->validate($request, [
'image' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048',
]);
$supir = DB::table('supir')->where('id' , $id)->first();
File::delete('image/' . $supir->image);
$image = $request->file('image');
$input['image'] = time().'.'.$image->getClientOriginalExtension();
$destinationPath = public_path('/image');
$img = Image::make($image->getRealPath());
$img->resize(300, 300, function ($constraint) {
$constraint->aspectRatio();
})->save($destinationPath.'/'.$input['image']);
Supir::find($id)->update($input);
}
else{
Supir::find($id)->update($input);
}
return redirect(url('/admin/supir'))->with('info','Data Supir Berhasil di Ubah');
}
public function profil(){
$this->data['title'] = 'Profil Anda';
return view('admin.profil.index',$this->data);
}
public function pemesanan(){
$key = Input::get('search');
$this->data['title'] = 'Pemesanan Bus IT Del';
if(isset($key)){
$this->data['pemesanan'] = Pemesanan::where('client_username','like','%'.$key.'%')->orderBy('id','desc')->paginate(10);
}else{
$this->data['pemesanan'] = Pemesanan::orderBy('id','desc')->paginate(10);
}
$this->data['total'] = DB::table('pemesanan')->get();
return view('admin.pemesanan.index',$this->data);
}
public function detailpemesanan($id){
$this->data['title'] = 'Detail Pemesanan';
$this->data['pemesanan'] = Pemesanan::find($id);
return view('admin.pemesanan.detail',$this->data);
}
}
...@@ -3,29 +3,12 @@ ...@@ -3,29 +3,12 @@
namespace App\Http\Controllers\Auth; namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers; use Illuminate\Support\Facades\Auth;
use Illuminate\Http\Request;
use Validator;
use App\User;
class LoginController extends Controller class LoginController extends Controller
{ {
/*
|--------------------------------------------------------------------------
| Login Controller
|--------------------------------------------------------------------------
|
| This controller handles authenticating users for the application and
| redirecting them to your home screen. The controller uses a trait
| to conveniently provide its functionality to your applications.
|
*/
use AuthenticatesUsers;
/**
* Where to redirect users after login.
*
* @var string
*/
protected $redirectTo = '/home';
/** /**
* Create a new controller instance. * Create a new controller instance.
...@@ -34,6 +17,39 @@ class LoginController extends Controller ...@@ -34,6 +17,39 @@ class LoginController extends Controller
*/ */
public function __construct() public function __construct()
{ {
$this->middleware('guest', ['except' => 'logout']); //$this->middleware('guest', ['except' => 'logout']);
}
// <!-- code : login - krs app - arnosa.net - and modified by group 9 -->
public function Login(Request $request){
$validator = Validator::make($request->all(), [
'username' => 'required|exists:users,username',
'password' => 'required',
], [
'username.required' => 'Username diperlukan!',
'username.exists' => 'Username tidak diketemukan',
'password.required' => 'Password diperlukan'
]);
if ($validator->fails()) {
return redirect('/')
->withErrors($validator)
->withInput();
} else {
if (Auth::attempt(['username' => $request->username, 'password' => $request->password])) {
if(Auth::user()->role == 'admin'){
return redirect()->intended('admin');
}elseif(Auth::user()->role == 'k_supir'){
return redirect()->intended('k_supir');
} else {
return redirect()->intended('klien');
}
} else {
$validator->errors()->add('password', 'Password tidak benar');
return redirect('/')
->withErrors($validator)
->withInput();
}
}
} }
} }
...@@ -6,6 +6,9 @@ use App\User; ...@@ -6,6 +6,9 @@ use App\User;
use Validator; use Validator;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\RegistersUsers; use Illuminate\Foundation\Auth\RegistersUsers;
use App\Models\Customer;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class RegisterController extends Controller class RegisterController extends Controller
{ {
...@@ -27,7 +30,7 @@ class RegisterController extends Controller ...@@ -27,7 +30,7 @@ class RegisterController extends Controller
* *
* @var string * @var string
*/ */
protected $redirectTo = '/home'; protected $redirectTo = '/register';
/** /**
* Create a new controller instance. * Create a new controller instance.
...@@ -39,6 +42,19 @@ class RegisterController extends Controller ...@@ -39,6 +42,19 @@ class RegisterController extends Controller
$this->middleware('guest'); $this->middleware('guest');
} }
public function store(Request $request){
$input = $request->all();
if($username = DB::table('customer_data')->where('username' , $input['username'])->first()){
return redirect()->back()->with('info','We are so sorry :( .Username is exists. Please choose another username');
}else{
User::create(['username' => $input['username'],'password' => bcrypt($input['password']),'role' => 'customer'])->id;
$customer = $request->except(['password','role']);
Customer::create($customer);
return redirect()->back()->with('info','Registrasi berhasil dilakukan. Silahkan login');
}
}
/** /**
* Get a validator for an incoming registration request. * Get a validator for an incoming registration request.
* *
......
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Input;
use File;
use App\Http\Requests;
use App\Models\Menu;
Use App\Models\OrderTemp;
Use App\Models\Order;
use Image;
class K_SupirController extends Controller
{
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input;
use File;
use App\Models\Pemesanan;
use App\Models\Bus;
use App\Models\Users;
use Image;
Use App\Models\OrderTemp;
Use App\Models\Order;
class KlienController extends Controller
{
public function pesan(){
$key = Input::get('search');
$this->data['title'] = 'Pesan Bus IT Del';
return view('klien.pesan.index',$this->data);
}
public function pemesanan(Request $request){
$input = $request->all();
Pemesanan::create($input);
return redirect(url('/klien'))->with('info','Data Bus berhasil ditambah');
}
public function bus(){
$key = Input::get('search');
$this->data['title'] = 'Bus IT Del';
if(isset($key)){
$this->data['bus'] = Bus::where('nama_bus','like','%'.$key.'%')->orderBy('id','desc')->paginate(10);
}else{
$this->data['bus'] = Bus::orderBy('id','desc')->paginate(10);
}
$this->data['total'] = DB::table('bus')->get();
return view('klien.bus.index',$this->data);
}
public function pilih(){
$key = Input::get('search');
$this->data['title'] = 'Bus IT Del';
if(isset($key)){
$this->data['bus'] = Bus::where('nama_bus','like','%'.$key.'%')->orderBy('id','desc')->paginate(10);
}else{
$this->data['bus'] = Bus::orderBy('id','desc')->paginate(10);
}
$this->data['total'] = DB::table('bus')->get();
return view('klien.pesan.pilih',$this->data);
}
public function detail($id){
$this->data['title'] = 'Detail Bus';
$this->data['bus'] = Bus::find($id);
return view('klien.bus.detail',$this->data);
}
public function history(){
$username = Auth::user()->username;
$users = DB::table('users')->where('username' , $username)->first();
$id = $users->id;
$this->data['title'] = 'History Pemesanan';
$this->data['users'] = Users::find($id);
$this->data['history'] = DB::table('pemesanan')->where('client_username' , $username)->orderBy('id','desc')->paginate(10);
$this->data['total'] = DB::table('pemesanan')->where('client_username' , $username)->get();
return view('klien.history.index',$this->data);
}
public function status(){
$username = Auth::user()->username;
$users = DB::table('users')->where('username' , $username)->first();
$id = $users->id;
$this->data['title'] = 'Status Pemesanan';
$this->data['users'] = Users::find($id);
$this->data['status'] = DB::table('pemesanan')->where('client_username' , $username)->orderBy('id','desc')->paginate(10);
$this->data['total'] = DB::table('pemesanan')->where('client_username' , $username)->get();
return view('klien.status.index',$this->data);
}
public function batal($id){
pemesanan::find($id)->delete();
return redirect(url('/klien/pesan'))->with('info','Pembatalan pemesanan berhasil dilakukan');
}
public function pilih_bus($id){
$key = Input::get('search');
$this->data['bus'] = Bus::find($id);
$this->data['title'] = 'Pilih Bus IT Del';
return view('klien.pesan.pilih_bus',$this->data);
}
}
...@@ -52,5 +52,8 @@ class Kernel extends HttpKernel ...@@ -52,5 +52,8 @@ class Kernel extends HttpKernel
'can' => \Illuminate\Auth\Middleware\Authorize::class, 'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'admin' => \App\Http\Middleware\AdminMid::class,
'k_supir' => \App\Http\Middleware\K_SupirMid::class,
'klien' => \App\Http\Middleware\KlienMid::class,
]; ];
} }
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
class AdminMid
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
if(Auth::check()){
if(Auth::user()->role != 'admin'){
return redirect('/');
}
} else {
return redirect('/');
}
return $next($request);
}
}
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
class K_SupirMid
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
if(Auth::check()){
if(Auth::user()->role != 'k_supir'){
return redirect('/');
}
} else {
return redirect('/');
}
return $next($request);
}
}
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
class KlienMid
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
if(Auth::check()){
if(Auth::user()->role != 'klien'){
return redirect('/');
}
} else {
return redirect('/');
}
return $next($request);
}
}
...@@ -18,9 +18,17 @@ class RedirectIfAuthenticated ...@@ -18,9 +18,17 @@ class RedirectIfAuthenticated
public function handle($request, Closure $next, $guard = null) public function handle($request, Closure $next, $guard = null)
{ {
if (Auth::guard($guard)->check()) { if (Auth::guard($guard)->check()) {
return redirect('/home'); if(Auth::user()->role == 'admin')
return redirect('admin');
}
if (Auth::guard($guard)->check()) {
if(Auth::user()->role == 'k_supir')
return redirect('k_supir');
}
if (Auth::guard($guard)->check()) {
if(Auth::user()->role == 'klien')
return redirect('klien');
} }
return $next($request); return $next($request);
} }
} }
<?php
namespace App\Jobs;
use Illuminate\Bus\Queueable;
abstract class Job
{
/*
|--------------------------------------------------------------------------
| Queueable Jobs
|--------------------------------------------------------------------------
|
| This job base class provides a central location to place any logic that
| is shared across all of your jobs. The trait included with the class
| provides access to the "onQueue" and "delay" queue helper methods.
|
*/
use Queueable;
}
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Bus extends Model
{
protected $table = 'bus';
protected $fillable = ['nama_bus','jenis_bus','plat_bus','deskripsi','image'];
//
}
\ No newline at end of file
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Klien extends Model
{
protected $table = 'users';
protected $fillable = ['username','password','role','image'];
//
}
\ No newline at end of file
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Pemesanan extends Model
{
protected $table = 'pemesanan';
protected $fillable = ['id','tujuan','jumlah','alasan','berangkat','kembali','client_username','plat_bus'];
//
}
\ No newline at end of file
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Supir extends Model
{
protected $table = 'supir';
protected $fillable = ['id','nama_supir','ttl','alamat','jk','agama','image'];
//
}
\ No newline at end of file
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Users extends Model
{
protected $table = 'users';
protected $fillable = ['username','password','role','image'];
//
}
\ No newline at end of file
...@@ -35,10 +35,10 @@ class RouteServiceProvider extends ServiceProvider ...@@ -35,10 +35,10 @@ class RouteServiceProvider extends ServiceProvider
*/ */
public function map() public function map()
{ {
$this->mapApiRoutes();
$this->mapWebRoutes(); $this->mapWebRoutes();
$this->mapApiRoutes();
// //
} }
......
...@@ -15,7 +15,7 @@ class User extends Authenticatable ...@@ -15,7 +15,7 @@ class User extends Authenticatable
* @var array * @var array
*/ */
protected $fillable = [ protected $fillable = [
'name', 'email', 'password', 'username', 'password','role'
]; ];
/** /**
...@@ -26,4 +26,6 @@ class User extends Authenticatable ...@@ -26,4 +26,6 @@ class User extends Authenticatable
protected $hidden = [ protected $hidden = [
'password', 'remember_token', 'password', 'remember_token',
]; ];
} }
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"require": { "require": {
"php": ">=5.6.4", "php": ">=5.6.4",
"laravel/framework": "5.3.*", "laravel/framework": "5.3.*",
"laravelcollective/html": "5.3.*" "intervention/image": "^2.3"
}, },
"require-dev": { "require-dev": {
"fzaninotto/faker": "~1.4", "fzaninotto/faker": "~1.4",
......
...@@ -12,7 +12,7 @@ return [ ...@@ -12,7 +12,7 @@ return [
| any other location as required by the application or its packages. | any other location as required by the application or its packages.
*/ */
'name' => 'Laravel', 'name' => 'Booking Driver IS',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
...@@ -173,11 +173,12 @@ return [ ...@@ -173,11 +173,12 @@ return [
* Application Service Providers... * Application Service Providers...
*/ */
App\Providers\AppServiceProvider::class, App\Providers\AppServiceProvider::class,
App\Providers\AuthServiceProvider::class,
// App\Providers\BroadcastServiceProvider::class, // App\Providers\BroadcastServiceProvider::class,
App\Providers\AuthServiceProvider::class,
App\Providers\EventServiceProvider::class, App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class, App\Providers\RouteServiceProvider::class,
Collective\Html\HtmlServiceProvider::class,
Intervention\Image\ImageServiceProvider::class,
], ],
...@@ -198,7 +199,6 @@ return [ ...@@ -198,7 +199,6 @@ return [
'Artisan' => Illuminate\Support\Facades\Artisan::class, 'Artisan' => Illuminate\Support\Facades\Artisan::class,
'Auth' => Illuminate\Support\Facades\Auth::class, 'Auth' => Illuminate\Support\Facades\Auth::class,
'Blade' => Illuminate\Support\Facades\Blade::class, 'Blade' => Illuminate\Support\Facades\Blade::class,
'Bus' => Illuminate\Support\Facades\Bus::class,
'Cache' => Illuminate\Support\Facades\Cache::class, 'Cache' => Illuminate\Support\Facades\Cache::class,
'Config' => Illuminate\Support\Facades\Config::class, 'Config' => Illuminate\Support\Facades\Config::class,
'Cookie' => Illuminate\Support\Facades\Cookie::class, 'Cookie' => Illuminate\Support\Facades\Cookie::class,
...@@ -226,8 +226,7 @@ return [ ...@@ -226,8 +226,7 @@ return [
'URL' => Illuminate\Support\Facades\URL::class, 'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class, 'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class, 'View' => Illuminate\Support\Facades\View::class,
'Form' => Collective\Html\FormFacade::class, 'Image' => Intervention\Image\Facades\Image::class,
'Html' => Collective\Html\HtmlFacade::class,
], ],
......
...@@ -81,6 +81,10 @@ return [ ...@@ -81,6 +81,10 @@ return [
| Resetting Passwords | Resetting Passwords
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Here you may set the options for resetting passwords including the view
| that is your password reset e-mail. You may also set the name of the
| table that maintains all of the reset tokens for your application.
|
| You may specify multiple password reset configurations if you have more | You may specify multiple password reset configurations if you have more
| than one user table or model in the application and you want to have | than one user table or model in the application and you want to have
| separate password reset settings based on the specific user types. | separate password reset settings based on the specific user types.
......
...@@ -52,11 +52,11 @@ return [ ...@@ -52,11 +52,11 @@ return [
'memcached' => [ 'memcached' => [
'driver' => 'memcached', 'driver' => 'memcached',
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
'sasl' => [ 'sasl' => [
env('MEMCACHED_USERNAME'), env('MEMCACHED_USERNAME'),
env('MEMCACHED_PASSWORD'), env('MEMCACHED_PASSWORD'),
], ],
'options' => [ 'options' => [
// Memcached::OPT_CONNECT_TIMEOUT => 2000, // Memcached::OPT_CONNECT_TIMEOUT => 2000,
], ],
'servers' => [ 'servers' => [
......
...@@ -62,7 +62,7 @@ return [ ...@@ -62,7 +62,7 @@ return [
'charset' => 'utf8', 'charset' => 'utf8',
'collation' => 'utf8_unicode_ci', 'collation' => 'utf8_unicode_ci',
'prefix' => '', 'prefix' => '',
'strict' => true, 'strict' => false,
'engine' => null, 'engine' => null,
], ],
......
...@@ -161,7 +161,7 @@ return [ ...@@ -161,7 +161,7 @@ return [
| |
*/ */
'secure' => env('SESSION_SECURE_COOKIE', false), 'secure' => false,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
......
...@@ -11,13 +11,14 @@ ...@@ -11,13 +11,14 @@
| |
*/ */
/** @var \Illuminate\Database\Eloquent\Factory $factory */
$factory->define(App\User::class, function (Faker\Generator $faker) { $factory->define(App\User::class, function (Faker\Generator $faker) {
static $password; static $password;
return [ return [
'name' => $faker->name, 'name' => $faker->name,
'email' => $faker->unique()->safeEmail, 'email' => $faker->safeEmail,
'password' => $password ?: $password = bcrypt('secret'), 'password' => $password ?: $password = bcrypt('secret'),
'remember_token' => str_random(10), 'remember_token' => str_random(10),
]; ];
}); });
\ No newline at end of file
...@@ -11,6 +11,6 @@ class DatabaseSeeder extends Seeder ...@@ -11,6 +11,6 @@ class DatabaseSeeder extends Seeder
*/ */
public function run() public function run()
{ {
// $this->call(UsersTableSeeder::class); // $this->call(UsersTableSeeder::class);
} }
} }
const elixir = require('laravel-elixir'); const elixir = require('laravel-elixir');
require('laravel-elixir-vue-2'); require('laravel-elixir-vue');
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
......
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
"gulp": "^3.9.1", "gulp": "^3.9.1",
"jquery": "^3.1.0", "jquery": "^3.1.0",
"laravel-elixir": "^6.0.0-9", "laravel-elixir": "^6.0.0-9",
"laravel-elixir-vue-2": "^0.2.0", "laravel-elixir-vue": "^0.1.4",
"laravel-elixir-webpack-official": "^1.0.2", "laravel-elixir-webpack-official": "^1.0.2",
"lodash": "^4.16.2", "lodash": "^4.14.0",
"vue": "^2.0.1", "vue": "^1.0.26",
"vue-resource": "^1.0.3" "vue-resource": "^0.9.3"
} }
} }
...@@ -16,5 +16,5 @@ require('./bootstrap'); ...@@ -16,5 +16,5 @@ require('./bootstrap');
Vue.component('example', require('./components/Example.vue')); Vue.component('example', require('./components/Example.vue'));
const app = new Vue({ const app = new Vue({
el: '#app' el: 'body'
}); });
...@@ -26,7 +26,7 @@ require('vue-resource'); ...@@ -26,7 +26,7 @@ require('vue-resource');
*/ */
Vue.http.interceptors.push((request, next) => { Vue.http.interceptors.push((request, next) => {
request.headers.set('X-CSRF-TOKEN', Laravel.csrfToken); request.headers['X-CSRF-TOKEN'] = Laravel.csrfToken;
next(); next();
}); });
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<script> <script>
export default { export default {
mounted() { ready() {
console.log('Component ready.') console.log('Component ready.')
} }
} }
......
// Body
$body-bg: #f5f8fa;
// Borders
$laravel-border-color: darken($body-bg, 10%);
$list-group-border: $laravel-border-color;
$navbar-default-border: $laravel-border-color;
$panel-default-border: $laravel-border-color;
$panel-inner-border: $laravel-border-color;
// Brands
$brand-primary: #3097D1;
$brand-info: #8eb4cb;
$brand-success: #2ab27b;
$brand-warning: #cbb956;
$brand-danger: #bf5329;
// Typography
$font-family-sans-serif: "Raleway", sans-serif;
$font-size-base: 14px;
$line-height-base: 1.6;
$text-color: #636b6f;
// Navbar
$navbar-default-bg: #fff;
// Buttons
$btn-default-color: $text-color;
// Inputs
$input-border: lighten($text-color, 40%);
$input-border-focus: lighten($brand-primary, 25%);
$input-color-placeholder: lighten($text-color, 30%);
// Panels
$panel-default-heading-bg: #fff;
...@@ -53,7 +53,6 @@ return [ ...@@ -53,7 +53,6 @@ return [
'array' => 'The :attribute may not have more than :max items.', 'array' => 'The :attribute may not have more than :max items.',
], ],
'mimes' => 'The :attribute must be a file of type: :values.', 'mimes' => 'The :attribute must be a file of type: :values.',
'mimetypes' => 'The :attribute must be a file of type: :values.',
'min' => [ 'min' => [
'numeric' => 'The :attribute must be at least :min.', 'numeric' => 'The :attribute must be at least :min.',
'file' => 'The :attribute must be at least :min kilobytes.', 'file' => 'The :attribute must be at least :min kilobytes.',
...@@ -81,7 +80,6 @@ return [ ...@@ -81,7 +80,6 @@ return [
'string' => 'The :attribute must be a string.', 'string' => 'The :attribute must be a string.',
'timezone' => 'The :attribute must be a valid zone.', 'timezone' => 'The :attribute must be a valid zone.',
'unique' => 'The :attribute has already been taken.', 'unique' => 'The :attribute has already been taken.',
'uploaded' => 'The :attribute failed to upload.',
'url' => 'The :attribute format is invalid.', 'url' => 'The :attribute format is invalid.',
/* /*
......
@if(Auth::check())
@extends('layouts.layout')
@include('layouts.header')
<body class="skin-blue sidebar-mini" style="height: auto;">
<div class="wrapper" style="height: auto;">
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section id="content-menu" class="content-menu">
<div class="module-menu-container"></div>
<ol class="breadcrumb"><li><a href="/"><i class="fa-home"></i> Home</a></li>
</ol><!-- breadcrumbs -->
</section>
<!-- Main content -->
<section class="content">
<div class="row"></div>
<!-- /.row -->
<div class="row"></div>
</section>
<!-- /.content -->
</div>
</div>
</body>
@endif
\ No newline at end of file
@if(Auth::check())
@extends('layouts.layout')
@include('layouts.header')
<body class="skin-blue sidebar-mini" style="height: auto;">
<div class="wrapper" style="height: auto;">
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section id="content-menu" class="content-menu">
<div class="module-menu-container"></div>
<ol class="breadcrumb"><li><a href="/"><i class="fa-home"></i> Home</a></li>
<li class="active"><i class="fa-users"></i>Profil</li>
</ol><!-- breadcrumbs -->
</section>
<!-- Main content -->
<section class="content">
<!-- /.row -->
<div class="row">
<div class="col-xs-12">
<div class="box box-primary">
<div class="box-header"></div>
<!-- /.box-header -->
<div class="box-body table-responsive no-padding"></div>
<!-- /.box-body -->
<div class="box-footer"></div>
</div>
<!-- /.box -->
</div>
</div>
</section>
<!-- /.content -->
</div>
</div>
</body>
@endif
\ No newline at end of file
@if(Auth::check())
@extends('layouts.layout')
@include('layouts.header')
<body class="skin-blue sidebar-mini" style="height: auto;">
<div class="wrapper" style="height: auto;">
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section id="content-menu" class="content-menu">
<div class="module-menu-container"></div>
<ol class="breadcrumb"><li><a href="/"><i class="fa-home"></i> Home</a></li>
<li class="active"><i class="fa-users"></i>User</li>
</ol><!-- breadcrumbs -->
</section>
<!-- Main content -->
<section class="content">
<!-- /.row -->
<div class="row">
<div class="col-xs-12">
<div class="box box-primary">
<div class="box-header">
<h3 class="box-title">User</h3>
<div class="box-tools">
<form action="{{url('/admin/user')}}">
<div class="input-group input-group-sm" style="width: 150px;">
<input type="text" name="search" class="form-control pull-right"
placeholder="Username" id="search" type="text">
<div class="input-group-btn">
<button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
</div>
</div>
</form>
</div>
<div class="form-group">
<?php $jumlah=0 ?>
@foreach($total as $tot)
<?php $jumlah++ ?>
@endforeach
<h4>Total User = {{$jumlah}}</h4>
</div>
</div>
<!-- /.box-header -->
<div class="box-body table-responsive no-padding">
<table class="table table-hover">
<thead><tr>
<th>Username User</th>
<th>Role</th>
<th>Created At</th>
<th>Updated At</th>
<th>Aksi</th>
</tr></thead>
<tbody>
@foreach($user as $stf)
<tr>
<td>{{$stf->username}}</td>
<td>{{$stf->role}}</td>
<td>{{$stf->created_at}}</td>
<td>{{$stf->updated_at}}</td>
<td>
<a href="{{url('admin/user/hapus',$stf->id)}}" class="btn btn-danger">Hapus</a>
<i fa-user-plus></i>
</td>
</tr>
</form>
@endforeach
</tbody>
</table>
{{$user->links()}}
</div>
<!-- /.box-body -->
<div class="box-footer">
<a href="{{url('admin/user/tambah')}}" class="btn btn-danger">Tambah User</a>
</div>
</div>
<!-- /.box -->
</div>
</div>
</section>
<!-- /.content -->
</div>
</div>
</body>
@endif
\ No newline at end of file
@if(Auth::check())
@extends('layouts.layout')
@include('layouts.header')
<body class="skin-blue sidebar-mini" style="height: auto;">
<div class="wrapper" style="height: auto;">
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section id="content-menu" class="content-menu">
<div class="module-menu-container"></div>
<ol class="breadcrumb"><li><a href="/"><i class="fa-home"></i> Home</a></li>
<li class="active"><i class="fa-users"></i>User</li>
<li class="active"><i class="fa-user"></i>Add User</li>
</ol><!-- breadcrumbs -->
</section>
<!-- Main content -->
<section class="content">
<div class="login-box">
<!-- /.login-logo -->
<div class="login-box-body">
<p class="login-box-msg">Add new User Sistem</p>
<form action="{{route('admin.store')}}" method="post" enctype="multipart/form-data">
{{ csrf_field() }}
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Username</label>
<input type="text" class="form-control" name="username" required>
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Password</label>
<input class="form-control" type="password" name="password" required/>
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Role</label>
<input type="text" value="klien" class="form-control" name="role" readonly>
</div>
<div class="form-group has-feedback">
<label for="exampleInputImage">Masukkan Gambar</label>
<input type="file" id="exampleInputImage" name="image" required/>
</div>
<div class="row">
<!-- /.col -->
<div class="col-xs-4">
<input type="submit" value="Tambah User" class="btn btn-danger">
</div>
<!-- /.col -->
</div>
</form>
</div>
<!-- /.login-box-body -->
</div>
</section>
<!-- /.content -->
</div>
</div>
</body>
@endif
\ No newline at end of file
@if(Auth::check())
@extends('layouts.layout')
@include('layouts.header')
<body class="skin-blue sidebar-mini" style="height: auto;">
<div class="wrapper" style="height: auto;">
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
Simple Tables
<small>preview of simple tables</small>
</h1>
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
<li><a href="#">Tables</a></li>
<li class="active">Simple</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-md-6">
<div class="box"></div>
<!-- /.box -->
<div class="box"></div>
<!-- /.box -->
</div>
<!-- /.col -->
<div class="col-md-6">
<div class="box"></div>
<!-- /.box -->
<div class="box"></div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
<div class="row">
<div class="col-xs-12">
<div class="box"></div>
<!-- /.box -->
</div>
</div>
</section>
<!-- /.content -->
</div>
</div>
</body>
@endif
\ No newline at end of file
@if(Auth::check())
@extends('layouts.layout')
@include('layouts.header')
<body class="skin-blue sidebar-mini" style="height: auto;">
<div class="wrapper" style="height: auto;">
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section id="content-menu" class="content-menu">
<div class="module-menu-container"></div>
<ol class="breadcrumb"><li><a href="/"><i class="fa-home"></i> Home</a></li>
<li class="active"><i class="fa-bus"></i>Pesan Bus</li>
<li class="active"><i class="fa-bus"></i>Pilih Bus</li>
<li class="active"><i class="fa-users"></i>Detail Bus</li>
</ol><!-- breadcrumbs -->
</section>
<!-- Main content -->
<section class="content">
<!-- /.row -->
<div class="row">
<div class="col-md-6">
<!-- Box Comment -->
<div class="box box-widget">
<div class="box-header with-border">
<div class="user-block">
<img style="display: block;margin-left: auto;margin-right: auto;" src="{{ asset('image/' . $bus->image) }}"/>
<span class="username">{{$bus->nama_bus}}</span>
</div>
<!-- /.user-block -->
<div class="box-tools">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
</div>
<!-- /.box-tools -->
</div>
<!-- /.box-header -->
<div class="box-body">
<img style="display: block;margin-left: auto;margin-right: auto;" src="{{ asset('image/' . $bus->image) }}"/>
</div>
<!-- /.box-footer -->
<div class="box-footer">
<form action="" method="post">
{{ csrf_field() }}
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Nama Bus</label>
<input type="text" class="form-control" name="nama_bus" value="{{$bus->nama_bus}}" readonly>
</div>
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Jenis Bus</label>
<input type="text" class="form-control" name="jenis_bus" value="{{$bus->jenis_bus}}" readonly>
</div>
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Plat Bus</label>
<input type="text" class="form-control" name="plat_bus" value="{{$bus->plat_bus}}" readonly>
</div>
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Deskripsi</label>
<textarea class="form-control" placeholder="Berikan deskripsi disini" rows="3" name="deskripsi" readonly>{{$bus->deskripsi}}</textarea>
</div>
<div class="form-group has-feedback">
<a href="{{url('klien/pesan/pilih_bus',$bus->id)}}" class="btn btn-danger">Pilih</a>
</div>
</form><br>
</div>
<!-- /.box-footer -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
</section>
<!-- /.content -->
</div>
</div>
</body>
@endif
\ No newline at end of file
@if(Auth::check())
@extends('layouts.layout')
@include('layouts.header')
<body class="skin-blue sidebar-mini" style="height: auto;">
<div class="wrapper" style="height: auto;">
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section id="content-menu" class="content-menu">
<div class="module-menu-container"></div>
<ol class="breadcrumb"><li><a href="/"><i class="fa-home"></i> Home</a></li>
<li class="active"><i class="fa-bus"></i>Pesan Bus</li>
<li class="active"><i class="fa-bus"></i>Pilih Bus</li>
</ol><!-- breadcrumbs -->
</section>
<!-- Main content -->
<section class="content">
<!-- /.row -->
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
<h3 class="box-title">List Bus</h3>
<div class="box-tools">
<form action="{{url('/klien/bus')}}">
<div class="input-group input-group-sm" style="width: 150px;">
<input type="text" name="search" class="form-control pull-right"
placeholder="Nama Bus" id="search" type="text">
<div class="input-group-btn">
<button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
</div>
</div>
</form>
</div>
</div>
<!-- /.box-header -->
<div class="box-body table-responsive no-padding">
<table class="table table-hover">
<thead><tr>
<th>Nama Bus</th>
<th>Jenis Bus</th>
<th>Plat Bus</th>
<th>Aksi</th>
</tr></thead>
<tbody>
@foreach($bus as $bu)
<tr>
<td>{{$bu->nama_bus}}</td>
<td>{{$bu->jenis_bus}}</td>
<td>{{$bu->plat_bus}}</td>
<td colspan="1">
<a href="{{url('klien/bus/detail',$bu->id)}}" class="btn btn-danger">Detail</a>
<a href="{{url('klien/pesan/pilih_bus',$bu->id)}}" class="btn btn-danger">Pesan Bus</a>
</td>
</tr>
</form>
@endforeach
</tbody>
</table>
</div>
<div class="box-footer">
<!--<a href="{{url('admin/bus/tambah')}}" class="btn btn-danger">Tambah Data Bus</a>-->
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
</div>
</section>
<!-- /.content -->
</div>
</div>
</body>
@endif
\ No newline at end of file
@if(Auth::check())
@extends('layouts.layout')
@include('layouts.header')
<body class="skin-blue sidebar-mini" style="height: auto;">
<div class="wrapper" style="height: auto;">
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section id="content-menu" class="content-menu">
<div class="module-menu-container"></div>
<ol class="breadcrumb"><li><a href="/"><i class="fa-home"></i> Home</a></li>
<li class="active"><i class="fa-bus"></i>Pemesanan Bus</li>
</ol><!-- breadcrumbs -->
</section>
<!-- Main content -->
<section class="content">
<!-- /.row -->
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
<h3 class="box-title">List Pemesanan</h3>
<div class="box-tools"></div>
</div>
<!-- /.box-header -->
<div class="box-body table-responsive no-padding">
<table class="table table-hover">
<thead><tr>
<th>Nama Pemesan</th>
<th>Tujuan</th>
<th>Berangkat</th>
<th>Plat Bus</th>
<th>Status</th>
</tr></thead>
<tbody>
@foreach($history as $his)
<tr>
<td>{{$his->client_username}}</td>
<td>{{$his->tujuan}}</td>
<td>{{$his->berangkat}}</td>
<td>{{$his->plat_bus}}</td>
<td><span class="label label-info">Request</span>
</tr>
</form>
@endforeach
</tbody>
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
</div>
</section>
<!-- /.content -->
</div>
</div>
</body>
@endif
\ No newline at end of file
@if(Auth::check())
@extends('layouts.layout')
@include('layouts.header')
<body class="skin-blue sidebar-mini" style="height: auto;">
<div class="wrapper" style="height: auto;">
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section id="content-menu" class="content-menu">
<div class="module-menu-container"></div>
<ol class="breadcrumb"><li><a href="/"><i class="fa-home"></i> Home</a></li>
</ol><!-- breadcrumbs -->
</section>
<!-- Main content -->
<section class="content">
<div class="row"></div>
<!-- /.row -->
<div class="row"></div>
</section>
<!-- /.content -->
</div>
</div>
</body>
@endif
\ No newline at end of file
@if(Auth::check())
@extends('layouts.layout')
@include('layouts.header')
<body class="skin-blue sidebar-mini" style="height: auto;">
<div class="wrapper" style="height: auto;">
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section id="content-menu" class="content-menu">
<div class="module-menu-container"></div>
<ol class="breadcrumb"><li><a href="/"><i class="fa-home"></i> Home</a></li>
<li class="active"><i class="fa-users"></i>Pesan Bus</li>
</ol><!-- breadcrumbs -->
</section>
<!-- Main content -->
<section class="content">
<div class="box box-default">
<form action="{{url('/klien/pemesanan')}}" method="post" enctype="multipart/form-data">
{{ csrf_field() }}
<div class="box-header with-border">
<h3 class="box-title">Formulir Pemesanan Bus</h3>
<span class="hidden-xs">{{ Auth::user()->username }}</span>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
</div>
</div>
<!-- /.box-header -->
<div class="box-body">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label>Nama Pemesan</label>
<input type="text" value="{{ Auth::user()->username }}" class="form-control" name="client_username" readonly>
</div>
<div class="form-group">
<label>Tempat Tujuan Keberangkatan</label>
<input type="text" class="form-control" name="tujuan" required>
</div>
<!-- /.form-group -->
<div class="form-group">
<label>Jumlah Anggota</label>
<input type="text" class="form-control" name="jumlah" required>
</div>
<!-- /.form-group -->
<div class="form-group">
<label>Keperluan Pemesanan</label>
<textarea class="form-control" rows="3"name="alasan" placeholder="Alasan..." style="width: 499px; height: 104px;" required></textarea>
</div>
<!-- /.form-group -->
</div>
<!-- /.col -->
<div class="col-md-6">
<div class="form-group">
<label>Rencana Keberangkatan:</label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
<input class="form-control" placeholder="yyyy-mm-dd" data-inputmask="'alias': 'yyyy-mm-dd'" data-mask="" type="date" name="berangkat" required>
</div>
<!-- /.input group -->
</div>
<!-- /.form-group -->
<div class="form-group">
<label>Rencana Kembali:</label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
<input class="form-control" placeholder="yyyy-mm-dd" data-inputmask="'alias': 'yyyy-mm-dd'" data-mask="" type="date" name="kembali" required>
</div>
<!-- /.input group -->
</div>
<!-- /.form-group -->
<div class="input-group input-group-sm">
<input type="text" value=" " class="form-control" name="plat_bus" required>
<span class="input-group-btn">
<a href="{{url('klien/pesan/pilih')}}" type="button" class="btn btn-info btn-flat">Pilih Bus</a>
</span>
</div>
<div class="form-group">
</div>
<!-- /.form-group -->
<!-- /.form-group -->
<div class="form-group">
<input type="submit" value="Pesan" class="btn btn-danger">
</div>
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
<!-- /.box-body -->
</form>
<div class="box-footer">* Pemesanan hanya dapat di lakukan 3 hari sebelum hari keberangkatan</div>
</div>
</section>
<!-- /.content -->
</div>
</div>
</body>
@endif
\ No newline at end of file
@if(Auth::check())
@extends('layouts.layout')
@include('layouts.header')
<body class="skin-blue sidebar-mini" style="height: auto;">
<div class="wrapper" style="height: auto;">
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section id="content-menu" class="content-menu">
<div class="module-menu-container"></div>
<ol class="breadcrumb"><li><a href="/"><i class="fa-home"></i> Home</a></li>
<li class="active"><i class="fa-bus"></i>Pesan Bus</li>
<li class="active"><i class="fa-bus"></i>Pilih Bus</li>
</ol><!-- breadcrumbs -->
</section>
<!-- Main content -->
<section class="content">
<!-- /.row -->
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
<h3 class="box-title">List Bus</h3>
<div class="box-tools">
<form action="{{url('/klien/pesan/pilih')}}">
<div class="input-group input-group-sm" style="width: 150px;">
<input type="text" name="search" class="form-control pull-right"
placeholder="Nama Bus" id="search" type="text">
<div class="input-group-btn">
<button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
</div>
</div>
</form>
</div>
</div>
<!-- /.box-header -->
<div class="box-body table-responsive no-padding">
<table class="table table-hover">
<thead><tr>
<th>Nama Bus</th>
<th>Jenis Bus</th>
<th>Plat Bus</th>
<th>Aksi</th>
</tr></thead>
<tbody>
@foreach($bus as $bu)
<tr>
<td>{{$bu->nama_bus}}</td>
<td>{{$bu->jenis_bus}}</td>
<td>{{$bu->plat_bus}}</td>
<td colspan="1">
<a href="{{url('klien/bus/detail',$bu->id)}}" class="btn btn-danger">Detail</a>
<a href="{{url('klien/pesan/pilih_bus',$bu->id)}}" class="btn btn-danger">Pilih</a>
</td>
</tr>
</form>
@endforeach
</tbody>
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
</div>
</section>
<!-- /.content -->
</div>
</div>
</body>
@endif
\ No newline at end of file
@if(Auth::check())
@extends('layouts.layout')
@include('layouts.header')
<body class="skin-blue sidebar-mini" style="height: auto;">
<div class="wrapper" style="height: auto;">
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section id="content-menu" class="content-menu">
<div class="module-menu-container"></div>
<ol class="breadcrumb"><li><a href="/"><i class="fa-home"></i> Home</a></li>
<li class="active"><i class="fa-users"></i>Pesan Bus</li>
</ol><!-- breadcrumbs -->
</section>
<!-- Main content -->
<section class="content">
<div class="box box-default">
<form action="{{url('/klien/pemesanan')}}" method="post" enctype="multipart/form-data">
{{ csrf_field() }}
<div class="box-header with-border">
<h3 class="box-title">Formulir Pemesanan Bus</h3>
<span class="hidden-xs">{{ Auth::user()->username }}</span>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
</div>
</div>
<!-- /.box-header -->
<div class="box-body">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label>Nama Pemesan</label>
<input type="text" value="{{ Auth::user()->username }}" class="form-control" name="client_username" readonly>
</div>
<div class="form-group">
<label>Tempat Tujuan Keberangkatan</label>
<input type="text" class="form-control" name="tujuan" required>
</div>
<!-- /.form-group -->
<div class="form-group">
<label>Jumlah Anggota</label>
<input type="text" class="form-control" name="jumlah" required>
</div>
<!-- /.form-group -->
<div class="form-group">
<label>Keperluan Pemesanan</label>
<textarea class="form-control" rows="3"name="alasan" placeholder="Alasan..." style="width: 499px; height: 104px;" required></textarea>
</div>
<!-- /.form-group -->
</div>
<!-- /.col -->
<div class="col-md-6">
<div class="form-group">
<label>Rencana Keberangkatan:</label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
<input class="form-control" placeholder="yyyy-mm-dd" data-inputmask="'alias': 'yyyy-mm-dd'" data-mask="" type="date" name="berangkat" required>
</div>
<!-- /.input group -->
</div>
<!-- /.form-group -->
<div class="form-group">
<label>Rencana Kembali:</label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
<input class="form-control" placeholder="yyyy-mm-dd" data-inputmask="'alias': 'yyyy-mm-dd'" data-mask="" type="date" name="kembali" required>
</div>
<!-- /.input group -->
</div>
<!-- /.form-group -->
<div class="input-group input-group-sm">
<input type="text" value="{{$bus->plat_bus}}" class="form-control" name="plat_bus" readonly>
<span class="input-group-btn">
<a href="{{url('klien/pesan/pilih')}}" type="button" class="btn btn-info btn-flat">Pilih Bus</a>
</span>
</div>
<div class="form-group">
</div>
<!-- /.form-group -->
<!-- /.form-group -->
<div class="form-group">
<input type="submit" value="Pesan" class="btn btn-danger">
</div>
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
<!-- /.box-body -->
</form>
<div class="box-footer">* Pemesanan hanya dapat di lakukan 3 hari sebelum hari keberangkatan</div>
</div>
</section>
<!-- /.content -->
</div>
</div>
</body>
@endif
\ No newline at end of file
@if(Auth::check())
@extends('layouts.layout')
@include('layouts.header')
<body class="skin-blue sidebar-mini" style="height: auto;">
<div class="wrapper" style="height: auto;">
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section id="content-menu" class="content-menu">
<div class="module-menu-container"></div>
<ol class="breadcrumb"><li><a href="/"><i class="fa-home"></i> Home</a></li>
<li class="active"><i class="fa-bus"></i>Status Pemesanan Bus</li>
</ol><!-- breadcrumbs -->
</section>
<!-- Main content -->
<section class="content">
<!-- /.row -->
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
<h3 class="box-title">List Pemesanan</h3>
<div class="box-tools"></div>
</div>
<!-- /.box-header -->
<div class="box-body table-responsive no-padding">
<table class="table table-hover">
<thead><tr>
<th>Nama Pemesan</th>
<th>Tujuan</th>
<th>Berangkat</th>
<th>Plat Bus</th>
<th>Status</th>
</tr></thead>
<tbody>
@foreach($status as $stat)
<tr>
<td>{{$stat->client_username}}</td>
<td>{{$stat->tujuan}}</td>
<td>{{$stat->berangkat}}</td>
<td>{{$stat->plat_bus}}</td>
<td><span class="label label-info">Request</span>
<button class="label label-danger">Batalkan</button></td>
</tr>
</form>
@endforeach
</tbody>
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
</div>
</section>
<!-- /.content -->
</div>
</div>
</body>
@endif
\ No newline at end of file
@if(Auth::check())
@extends('layouts.layout')
@include('layouts.header')
<body class="skin-blue sidebar-mini" style="height: auto;">
<div class="wrapper" style="height: auto;">
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section id="content-menu" class="content-menu">
<div class="module-menu-container"></div>
<ol class="breadcrumb"><li><a href="/"><i class="fa-home"></i> Home</a></li>
<li class="active"><i class="fa-bus"></i>Status Pemesanan Bus</li>
</ol><!-- breadcrumbs -->
</section>
<!-- Main content -->
<section class="content">
<!-- /.row -->
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
<h3 class="box-title">List Pemesanan</h3>
<div class="box-tools"></div>
</div>
<!-- /.box-header -->
<div class="box-body table-responsive no-padding">
<table class="table table-hover">
<thead><tr>
<th>Nama Pemesan</th>
<th>Tujuan</th>
<th>Berangkat</th>
<th>Plat Bus</th>
<th>Status</th>
</tr></thead>
<tbody>
@foreach($status as $stat)
<tr>
<td>{{$stat->client_username}}</td>
<td>{{$stat->tujuan}}</td>
<td>{{$stat->berangkat}}</td>
<td>{{$stat->plat_bus}}</td>
<td><span class="label label-info">Request</span>
<a href="{{url('klien/pemesanan/batal',$stat->id)}}" class="label label-danger">Batalkan</a></td>
</tr>
</form>
@endforeach
</tbody>
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
</div>
</section>
<!-- /.content -->
</div>
</div>
</body>
@endif
\ No newline at end of file
...@@ -36,28 +36,6 @@ ...@@ -36,28 +36,6 @@
<i class="fa fa-group"></i> <span>User</span> <i class="fa fa-group"></i> <span>User</span>
</a> </a>
</li> </li>
<li class="{{Request::segment(2) == 'bus' ? 'active' : ''}}">
<a href="{{url('admin/bus')}}">
<i class="fa-truck"></i> <span>Bus</span>
</a>
</li>
<li class="treeview {{Request::segment(2) == 'supir' ? 'active' : ''}}">
<a href="#"><span>Supir</span> <i class="fa fa-angle-left pull-right"></i></a>
<ul class="treeview-menu">
<li><a href="{{url('admin/supir')}}">Data Supir</a></li>
</ul>
</li>
<li class="{{Request::segment(2) == 'pemesanan' ? 'active' : ''}}">
<a href="{{url('admin/pemesanan')}}">
<i class="fa fa-group"></i>
<span>Pemesanan</span>
<small class="label pull-right bg-yellow">
</small>
</a>
</li>
</ul> </ul>
......
...@@ -58,7 +58,7 @@ Route::group(['prefix' => 'admin','middleware' => 'admin'], function() { ...@@ -58,7 +58,7 @@ Route::group(['prefix' => 'admin','middleware' => 'admin'], function() {
Route::get('/profil','AdminController@profil'); Route::get('/profil','AdminController@profil');
Route::get('/pemesanan','AdminController@pemesanan'); Route::get('/pemesanan','AdminController@pemesanan');
Route::get('/pemesanan/detail/{id}','AdminController@detailpemesanan');
}); });
Route::group(['prefix' => 'k_supir','middleware' => 'k_supir'], function() { Route::group(['prefix' => 'k_supir','middleware' => 'k_supir'], function() {
...@@ -75,11 +75,12 @@ Route::group(['prefix' => 'klien','middleware' => 'klien'], function() { ...@@ -75,11 +75,12 @@ Route::group(['prefix' => 'klien','middleware' => 'klien'], function() {
}); });
Route::resource('klien','KlienController'); Route::resource('klien','KlienController');
Route::get('/pesan','KlienController@pesan'); Route::get('/pesan','KlienController@pesan');
Route::get('/pesan/pilih','KlienController@pilih');
Route::post('/pemesanan','KlienController@pemesanan'); Route::post('/pemesanan','KlienController@pemesanan');
Route::get('/bus','KlienController@bus'); Route::get('/bus','KlienController@bus');
Route::get('/bus/detail/{id}','KlienController@detail'); Route::get('/bus/detail/{id}','KlienController@detail');
Route::get('/history','KlienController@history'); Route::get('/history','KlienController@history');
Route::get('/status','KlienController@status'); Route::get('/status','KlienController@status');
Route::get('/pemesanan/batal/{id}','KlienController@batal'); Route::get('/pemesanan/batal/{id}','KlienController@batal');
Route::get('/pesan/pilih_bus/{id}','KlienController@pilih_bus');
}); });
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment