bantenprov/yankes-info-kamar

Informasi ruang / kamar untuk rawat inap yang dapat digunakan

1.0.0 2017-11-28 15:01 UTC

This package is not auto-updated.

Last update: 2024-12-19 17:39:23 UTC


README

Sistem informasi layanan kesehatan terpadu.

Scrutinizer Code Quality Build Status

Install Laravel :

$ composer create-project --prefer-dist laravel/laravel project-name "5.4.*"

create table rumahsakits :

$ php artisan make:migration create_rumahsakits_table --create=rumahsakits

create migratation schema :

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

migrate :

$ php artisan migrate

create Controller :

$ php artisan make:controller RumahsakitController -r

create Model :

$ php artisan make:model Rumahsakit

model Rumahsakit :

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');
    }
}

Install package :

$ composer require bantenprov/yankes-info-kamar

config/app.php

'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,
    ]

Artisan command :

$ php artisan bantenprov:create-controller
$ php artisan bantenprov:create-view
$ php artisan bantenprov:create-model
$ php artisan migrate
$ php artisan make:auth

Route web :

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');

run local server

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