PHP code example of bantenprov / yankes-info-kamar

1. Go to this page and download the library: Download bantenprov/yankes-info-kamar library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bantenprov / yankes-info-kamar example snippets


Schema::create('rumahsakits', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->string('alamat');
              $table->softDeletes();
            $table->timestamps();
        });

namespace App;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;


class Rumahsakit extends Model
{

    use SoftDeletes;
    protected $table ='rumahsakits';
    protected $fillable = ['name','alamat'];


    public function kamar()
    {
      return $this->hasMany('App\Kelasrawat','id');
    }
}

'providers' => [
    ...
    App\Providers\AppServiceProvider::class,
    App\Providers\AuthServiceProvider::class,
    App\Providers\EventServiceProvider::class,
    App\Providers\RouteServiceProvider::class,
    ...
    Bantenprov\YankesInfoKamar\InfoKamarServiceProvider::class,
    Collective\Html\HtmlServiceProvider::class,
    ],


'aliases' => [
    ....
    'Form' => Collective\Html\FormFacade::class,
    'Html' => Collective\Html\HtmlFacade::class,
    ]

Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');

Route::resource('rumah-sakit','RumahsakitController');
Route::resource('kelasrawat', 'KelasController');
Route::resource('ruangrawat', 'RuangController');
Route::resource('bedrawat', 'BedController');



1. php artisan serve
2. http://127.0.0.1:8000/home

bash
$ php artisan make:migration create_rumahsakits_table --create=rumahsakits
bash
$ php artisan migrate
bash
$ php artisan make:controller RumahsakitController -r
bash
$ php artisan make:model Rumahsakit
bash
$ php artisan bantenprov:create-controller
$ php artisan bantenprov:create-view
$ php artisan bantenprov:create-model
$ php artisan migrate
$ php artisan make:auth