Browse Source

Restructure login view and remove laravel dompdf dependency

Remove unused files
pull/1/head
Nafies Luthfi 8 years ago
parent
commit
983b021913
  1. 16
      app/Entities/Masters/Master.php
  2. 14
      app/Entities/Masters/MasterPresenter.php
  3. 18
      app/Entities/Masters/MastersRepository.php
  4. 12
      app/Entities/References/Reference.php
  5. 1
      composer.json
  6. 241
      composer.lock
  7. 33
      database/migrations/2016_03_04_030804_create_site_references_table.php
  8. 35
      resources/views/auth/login.blade.php
  9. 10
      resources/views/auth/partials/_errors.blade.php
  10. 11
      resources/views/auth/partials/_notifications.blade.php
  11. 2
      resources/views/auth/register.blade.php

16
app/Entities/Masters/Master.php

@ -1,16 +0,0 @@
<?php
namespace App\Entities\Masters;
use App\Entities\Masters\MasterPresenter;
use Illuminate\Database\Eloquent\Model;
use Laracasts\Presenter\PresentableTrait;
class Master extends Model {
use PresentableTrait;
protected $presenter = MasterPresenter::class;
protected $guarded = ['id','created_at','updated_at'];
}

14
app/Entities/Masters/MasterPresenter.php

@ -1,14 +0,0 @@
<?php
namespace App\Entities\Masters;
use Laracasts\Presenter\Presenter;
class MasterPresenter extends Presenter
{
public function fullName()
{
return $this->name;
}
}

18
app/Entities/Masters/MastersRepository.php

@ -1,18 +0,0 @@
<?php
namespace App\Entities\Masters;
use App\Entities\BaseRepository;
/**
* Masters Repository Class
*/
class MastersRepository extends BaseRepository
{
protected $model;
public function __construct(Master $model)
{
parent::__construct($model);
}
}

12
app/Entities/References/Reference.php

@ -1,12 +0,0 @@
<?php
namespace App\Entities\References;
use Illuminate\Database\Eloquent\Model;
class Reference extends Model {
protected $fillable = ['cat','code','name'];
protected $table = 'references';
public $timestamps = false;
}

1
composer.json

@ -7,7 +7,6 @@
"require": {
"php": ">=7.0.0",
"backup-manager/laravel": "dev-master",
"barryvdh/laravel-dompdf": "^0.8.0",
"intervention/image": "^2.3",
"laracasts/flash": "~2",
"laracasts/presenter": "^0.2.1",

241
composer.lock

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "fc5bb1ecce7c375fae4d8ca2d512da7c",
"content-hash": "f1fd8e5aced5f88b95ebbe2f66adb308",
"packages": [
{
"name": "backup-manager/backup-manager",
@ -134,62 +134,6 @@
"time": "2017-09-27T05:15:29+00:00"
},
{
"name": "barryvdh/laravel-dompdf",
"version": "v0.8.1",
"source": {
"type": "git",
"url": "https://github.com/barryvdh/laravel-dompdf.git",
"reference": "3b2235e589616331d68482d61b7763789a2600fe"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/barryvdh/laravel-dompdf/zipball/3b2235e589616331d68482d61b7763789a2600fe",
"reference": "3b2235e589616331d68482d61b7763789a2600fe",
"shasum": ""
},
"require": {
"dompdf/dompdf": "^0.8",
"illuminate/support": "5.1.x|5.2.x|5.3.x|5.4.x|5.5.x",
"php": ">=5.5.9"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "0.8-dev"
},
"laravel": {
"providers": [
"Barryvdh\\DomPDF\\ServiceProvider"
],
"aliases": {
"PDF": "Barryvdh\\DomPDF\\Facade"
}
}
},
"autoload": {
"psr-4": {
"Barryvdh\\DomPDF\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Barry vd. Heuvel",
"email": "barryvdh@gmail.com"
}
],
"description": "A DOMPDF Wrapper for Laravel",
"keywords": [
"dompdf",
"laravel",
"pdf"
],
"time": "2017-07-29T19:01:17+00:00"
},
{
"name": "doctrine/inflector",
"version": "v1.2.0",
"source": {
@ -311,68 +255,6 @@
"time": "2014-09-09T13:34:57+00:00"
},
{
"name": "dompdf/dompdf",
"version": "v0.8.1",
"source": {
"type": "git",
"url": "https://github.com/dompdf/dompdf.git",
"reference": "9ea852c4bdc74fac5def165e6cd52353f7ca3b3f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/dompdf/dompdf/zipball/9ea852c4bdc74fac5def165e6cd52353f7ca3b3f",
"reference": "9ea852c4bdc74fac5def165e6cd52353f7ca3b3f",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-gd": "*",
"ext-mbstring": "*",
"phenx/php-font-lib": "0.5.*",
"phenx/php-svg-lib": "0.3.*",
"php": ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": "4.8.*",
"squizlabs/php_codesniffer": "2.*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-develop": "0.7-dev"
}
},
"autoload": {
"psr-4": {
"Dompdf\\": "src/"
},
"classmap": [
"lib/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-2.1"
],
"authors": [
{
"name": "Fabien Ménager",
"email": "fabien.menager@gmail.com"
},
{
"name": "Brian Sweeney",
"email": "eclecticgeek@gmail.com"
},
{
"name": "Gabriel Bull",
"email": "me@gabrielbull.com"
}
],
"description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter",
"homepage": "https://github.com/dompdf/dompdf",
"time": "2017-09-14T01:36:24+00:00"
},
{
"name": "egulias/email-validator",
"version": "2.1.2",
"source": {
@ -1502,83 +1384,6 @@
"time": "2017-03-13T16:27:32+00:00"
},
{
"name": "phenx/php-font-lib",
"version": "0.5.1",
"source": {
"type": "git",
"url": "https://github.com/PhenX/php-font-lib.git",
"reference": "760148820110a1ae0936e5cc35851e25a938bc97"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PhenX/php-font-lib/zipball/760148820110a1ae0936e5cc35851e25a938bc97",
"reference": "760148820110a1ae0936e5cc35851e25a938bc97",
"shasum": ""
},
"require-dev": {
"phpunit/phpunit": "^4.8"
},
"type": "library",
"autoload": {
"psr-4": {
"FontLib\\": "src/FontLib"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-3.0"
],
"authors": [
{
"name": "Fabien Ménager",
"email": "fabien.menager@gmail.com"
}
],
"description": "A library to read, parse, export and make subsets of different types of font files.",
"homepage": "https://github.com/PhenX/php-font-lib",
"time": "2017-09-13T16:14:37+00:00"
},
{
"name": "phenx/php-svg-lib",
"version": "v0.3",
"source": {
"type": "git",
"url": "https://github.com/PhenX/php-svg-lib.git",
"reference": "a85f7fe9fe08d093a4a8583cdd306b553ff918aa"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PhenX/php-svg-lib/zipball/a85f7fe9fe08d093a4a8583cdd306b553ff918aa",
"reference": "a85f7fe9fe08d093a4a8583cdd306b553ff918aa",
"shasum": ""
},
"require": {
"sabberworm/php-css-parser": "8.1.*"
},
"require-dev": {
"phpunit/phpunit": "~5.0"
},
"type": "library",
"autoload": {
"psr-0": {
"Svg\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-3.0"
],
"authors": [
{
"name": "Fabien Ménager",
"email": "fabien.menager@gmail.com"
}
],
"description": "A library to read, parse and export to PDF SVG files.",
"homepage": "https://github.com/PhenX/php-svg-lib",
"time": "2017-05-24T10:07:27+00:00"
},
{
"name": "phpoffice/phpexcel",
"version": "1.8.1",
"source": {
@ -1958,50 +1763,6 @@
"time": "2017-09-08T07:28:55+00:00"
},
{
"name": "sabberworm/php-css-parser",
"version": "8.1.0",
"source": {
"type": "git",
"url": "https://github.com/sabberworm/PHP-CSS-Parser.git",
"reference": "850cbbcbe7fbb155387a151ea562897a67e242ef"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sabberworm/PHP-CSS-Parser/zipball/850cbbcbe7fbb155387a151ea562897a67e242ef",
"reference": "850cbbcbe7fbb155387a151ea562897a67e242ef",
"shasum": ""
},
"require": {
"php": ">=5.3.2"
},
"require-dev": {
"phpunit/phpunit": "*"
},
"type": "library",
"autoload": {
"psr-0": {
"Sabberworm\\CSS": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Raphael Schweikert"
}
],
"description": "Parser for CSS Files written in PHP",
"homepage": "http://www.sabberworm.com/blog/2010/6/10/php-css-parser",
"keywords": [
"css",
"parser",
"stylesheet"
],
"time": "2016-07-19T19:14:21+00:00"
},
{
"name": "spatie/fractalistic",
"version": "2.7.0",
"source": {

33
database/migrations/2016_03_04_030804_create_site_references_table.php

@ -1,33 +0,0 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSiteReferencesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('site_references', function (Blueprint $table)
{
$table->increments('id');
$table->string('cat', 20);
$table->char('code', 1);
$table->string('name', 60);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('site_references');
}
}

35
resources/views/auth/login.blade.php

@ -4,28 +4,25 @@
@section('content')
@include('flash::message')
<div class="login-panel col-md-4 col-md-offset-4">
<div class="text-center">
<img src="{{ url('assets/imgs/logo.png') }}" alt="Logo {{ Option::get('app_owner') }}">
</div>
<h3 class="text-center">{{ Option::get('app_name','Aplikasi Laravel') }}</h3>
<div class="login-panel col-md-4 col-md-offset-4 text-center">
{{ Html::image(url('assets/imgs/logo.png'), 'Logo '.Option::get('app_name','Aplikasi Laravel')) }}
<h3>{{ Option::get('app_name','Aplikasi Laravel') }}</h3>
<div class="panel panel-default">
<div class="panel-body">
@include('auth.partials._errors')
{!! Form::open(['route'=>'auth.login']) !!}
<div class="form-group {!! $errors->has('email') ? 'has-error' : ''; !!}">
{!! Form::email('email', null, ['class'=>'form-control', 'placeholder'=> trans('auth.email')]) !!}
</div>
<div class="form-group {!! $errors->has('password') ? 'has-error' : ''; !!}">
{!! Form::password('password', ['class'=>'form-control', 'placeholder'=> trans('auth.password')]) !!}
</div>
<div class="checkbox">
<label><input name="remember" type="checkbox" value="Remember Me">Remember Me</label>
{!! link_to_route('auth.reset-request', trans('auth.forgot_password'),[],['class'=>'pull-right']) !!}
@include('auth.partials._notifications')
{{ Form::open(['route'=>'auth.login']) }}
{!! FormField::email('email', ['label' => false, 'placeholder'=> trans('auth.email')]) !!}
{!! FormField::password('password', ['label' => false, 'placeholder'=> trans('auth.password')]) !!}
{{ Form::submit(trans('auth.login'), ['class'=>'btn btn-success btn-block']) }}
<div class="row">
<div class="col-md-6">
{{ link_to_route('auth.register', trans('auth.need_account'),[],['class'=>'btn btn-link']) }}
</div>
<div class="col-md-6">
{{ link_to_route('auth.reset-request', trans('auth.forgot_password'), [], ['class'=>'btn btn-link']) }}
</div>
</div>
{!! Form::submit(trans('auth.login'), ['class'=>'btn btn-success btn-block']) !!}
{!! link_to_route('auth.register', trans('auth.need_account'),[],['class'=>'btn btn-info btn-block']) !!}
{!! Form::close() !!}
{{ Form::close() }}
</div>
</div>
</div>

10
resources/views/auth/partials/_errors.blade.php

@ -1,10 +0,0 @@
@if (count($errors) > 0)
<div class="alert alert-danger">
<strong>Ups!</strong> Mohon cek kembali form berikut.
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif

11
resources/views/auth/partials/_notifications.blade.php

@ -3,4 +3,13 @@
{{ session('status') }}
</div>
@endif
@include('auth.partials._errors')
@if (count($errors) > 0)
<div class="alert alert-danger">
<strong>Ups!</strong> Mohon cek kembali form berikut.
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif

2
resources/views/auth/register.blade.php

@ -7,7 +7,7 @@
<div class="login-panel panel panel-default">
<div class="panel-heading"><h3 class="panel-title">{{ trans('auth.register') }}</h3></div>
<div class="panel-body">
@include('auth.partials._errors')
@include('auth.partials._notifications')
{!! Form::open(['route'=>'auth.register','class'=>'form-horizontal']) !!}
<div class="form-group {!! $errors->has('name') ? 'has-error' : ''; !!}">
{!! Form::label('name', trans('app.name'), ['class'=>'col-md-4 control-label']) !!}

Loading…
Cancel
Save