Category: Laravel

0

Tutorial Laravel from Scratch

Haloo php developer Sebelumnya penulis pernah mempublikasikan tutorial PHP Native dengan PDO, kali ini penulis akan membagikan ebook Tutorial Laravel 5.0 menggunakan Env Apache2 Linux14.04LTS dan PHP5 serta MySQL5.5 tentunya dengan judul Laravel from...

0

Laravel Dynamic Menu

 <ul class=”sidebar-menu”> <li class=”header”>NAVIGATION</li> <?php $menu_0 = \App\Menu::where(‘id_induk’,0)->get(); foreach ($menu_0 as $key) { get_menu_child($key->id); } function get_menu_child($parent=0){ $menu = \App\Menu::where(‘id_induk’,$parent)->get(); $parent = \App\Menu::where(‘id’,$parent)->first(); ?> <li class=”treeview”> <a href=”{{url($parent->url)}}”> <i class=”fa {{$parent->icon}}”></i> <span>{{$parent->nama}}</span> @if(sizeof($menu)>0) <i...

0

Laravel Named Routes

Route::get(‘master/division/all’, [‘as’=>’all_division’,’uses’=>’MasterController@division_index’]); Route::get(‘master/division/add’, [‘as’=>’add_division’,’uses’=>’MasterController@division_add’]); Route::post(‘master/division/save’, [‘as’=>’save_division’,’uses’=>’MasterController@division_save’]); Route::get(‘master/division/edit/{id}’, [‘as’=>’edit_division’,’uses’=>’MasterController@division_edit’]); Route::post(‘master/division/update’, [‘as’=>’update_division’,’uses’=>’MasterController@division_update’]); Route::get(‘master/division/delete/{id}’, [‘as’=>’delete_division’,’uses’=>’MasterController@division_delete’]); Route::get(‘master/level/all’, [‘as’=>’all_level’,’uses’=>’MasterController@level_index’]); Route::get(‘master/level/add’, [‘as’=>’add_level’,’uses’=>’MasterController@level_add’]); Route::post(‘master/level/save’, [‘as’=>’save_level’,’uses’=>’MasterController@level_save’]); Route::get(‘master/level/edit/{id}’, [‘as’=>’edit_level’,’uses’=>’MasterController@level_edit’]); Route::post(‘master/level/update’, [‘as’=>’update_level’,’uses’=>’MasterController@level_update’]); Route::get(‘master/level/delete/{id}’, [‘as’=>’delete_level’,’uses’=>’MasterController@level_delete’]); Route::get(‘master/employeer/all’, [‘as’=>’all_employeer’,’uses’=>’MasterController@employeer_index’]); Route::get(‘master/employeer/add’, [‘as’=>’add_employeer’,’uses’=>’MasterController@employeer_add’]); Route::post(‘master/employeer/save’, [‘as’=>’save_employeer’,’uses’=>’MasterController@employeer_save’]); Route::get(‘master/employeer/edit/{id}’, [‘as’=>’edit_employeer’,’uses’=>’MasterController@employeer_edit’]); Route::post(‘master/employeer/update’, [‘as’=>’update_employeer’,’uses’=>’MasterController@employeer_update’]);...

0

PHP Laravel save data dengan upload file

$gambar = “”; $divisi = new Divisi; $divisi->nama = Input::get(‘nama’); if(Input::hasFile(‘gambar’) and Input::file(‘gambar’)->isValid()){ $gambar = date(“YmdHis”) .uniqid() .”.” .Input::file(‘gambar’)->getClientOriginalExtension(); Input::file(‘gambar’)->move(storage_path().’/gambardivisi’,$gambar); } $divisi->gambar = $gambar; $divisi->keterangan = Input::get(‘keterangan’); $divisi->save();

0

PHP Laravel update data dengan upload file

$gambar = “”; $divisi = Divisi::where(‘id’,Input::get(‘id’))->first(); $divisi->nama = Input::get(‘nama’); if(Input::hasFile(‘gambar’) and Input::file(‘gambar’)->isValid()){ $gambar = date(“YmdHis”) .uniqid() .”.” .Input::file(‘gambar’)->getClientOriginalExtension(); Input::file(‘gambar’)->move(storage_path().’/gambardivisi’,$gambar); $divisi->gambar = $gambar; } $divisi->keterangan = Input::get(‘keterangan’); $divisi->save();

0

PHP Laravel Route Group

Route::group([‘prefix’ => ‘marketing’], function() { Route::group([‘prefix’ => ‘force’], function() { Route::group([‘prefix’ => ‘preferences’], function() { Route::group([‘prefix’ => ‘customer’], function() { Route::group([‘prefix’ => ‘trigger’], function() { Route::get(‘all’, ‘PreferencesController@trigger_customer_all’); Route::get(‘add’, ‘PreferencesController@trigger_customer_add’); Route::post(‘add’, ‘PreferencesController@trigger_customer_save’); }); }); });...

Screenshot from 2015-10-16 23:35:10 0

Trigger Conditional

bismillah… persaingan makin ketat dunia ini makin maya jangan menyerah jangan putus asa jangan berkeluh kesah lakukan! ~ melakukan aksi kepada data menggunakan data

0

PHP Laravel Logdata Migration

<?php use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateLogdatasTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create(‘logdatas’, function(Blueprint $table) { $table->increments(‘id’); $table->integer(‘idpengguna’); $table->string(‘ip’); $table->string(‘url’); $table->text(‘user_agent’); $table->int(‘ip_port’);...