From 31429a12c31142f39f3397c20991b875b25d91b0 Mon Sep 17 00:00:00 2001 From: Nafies Luthfi Date: Sun, 19 Nov 2017 20:36:07 +0800 Subject: [PATCH] Add agency logo image upload validation Write CONCEPT.md Update README.md Add app.name config Update login page, register page, sidebar and footer section --- readme.md => CONCEPT.md | 4 +-- README.md | 28 +++++++++++++++++++++ app/Http/Controllers/Users/AgencyController.php | 4 ++- config/app.php | 13 ++++++++++ resources/lang/id/nav_menu.php | 2 +- resources/lang/id/validation.php | 1 + resources/views/auth/login.blade.php | 2 +- resources/views/auth/register.blade.php | 3 +-- resources/views/layouts/guest.blade.php | 2 +- resources/views/layouts/partials/footer.blade.php | 9 ++++--- resources/views/layouts/partials/sidebar.blade.php | 2 +- storage/app/.gitignore | 2 +- storage/app/sample-image.jpg | Bin 80156 -> 0 bytes storage/app/sample-image.png | Bin 0 -> 45668 bytes tests/Feature/AgencyProfileTest.php | 6 ++--- 15 files changed, 62 insertions(+), 16 deletions(-) rename readme.md => CONCEPT.md (93%) create mode 100644 README.md delete mode 100755 storage/app/sample-image.jpg create mode 100644 storage/app/sample-image.png diff --git a/readme.md b/CONCEPT.md similarity index 93% rename from readme.md rename to CONCEPT.md index 8599225..0511a72 100644 --- a/readme.md +++ b/CONCEPT.md @@ -1,6 +1,6 @@ -# Project Management Office +# Free PMO -Project Management Office, is a project management tool for freelancers and agencies to manage and monitor their project easier. +Free PMO adalah sebuah tool untuk mempermudah pengelolaan dan monitor project bagi feelancer dan agensi. ## Konsep diff --git a/README.md b/README.md new file mode 100644 index 0000000..c71ebe6 --- /dev/null +++ b/README.md @@ -0,0 +1,28 @@ +# Free PMO + +Free PMO adalah sebuah tool untuk mempermudah pengelolaan dan monitor project bagi feelancer dan agensi. + +#### Tagline + +> Show our clients that we are managing our projects professionally. + + +## Tentang + +## Cara Install + +#### Spesifikasi Server + +#### Tahapan Install + +## Kontributor + +## Lisensi + +## Cara Berkontribusi + +#### Membuat Issue + +#### Membuat Pull Request + +## Screenshots diff --git a/app/Http/Controllers/Users/AgencyController.php b/app/Http/Controllers/Users/AgencyController.php index 1c18430..5a4bc7a 100644 --- a/app/Http/Controllers/Users/AgencyController.php +++ b/app/Http/Controllers/Users/AgencyController.php @@ -48,7 +48,9 @@ class AgencyController extends Controller public function logoUpload() { $file = request()->validate([ - 'logo' => 'required|max:100|file_extension:png,jpg', + 'logo' => 'required|file_extension:png|max:100|dimensions:min_width=100,max_width=200', + ], [ + 'file_extension' => 'Silakan upload file format .png', ]); \File::delete(public_path('assets/imgs/'.Option::get('agency_logo_path'))); diff --git a/config/app.php b/config/app.php index b703cfd..684a9a7 100644 --- a/config/app.php +++ b/config/app.php @@ -4,6 +4,19 @@ return [ /* |-------------------------------------------------------------------------- + | Application Name + |-------------------------------------------------------------------------- + | + | This value is the name of your application. This value is used when the + | framework needs to place the application's name in a notification or + | any other location as required by the application or its packages. + | + */ + + 'name' => 'Free PMO', + + /* + |-------------------------------------------------------------------------- | Application Environment |-------------------------------------------------------------------------- | diff --git a/resources/lang/id/nav_menu.php b/resources/lang/id/nav_menu.php index e5aede7..fe8ff72 100644 --- a/resources/lang/id/nav_menu.php +++ b/resources/lang/id/nav_menu.php @@ -2,5 +2,5 @@ return [ 'dashboard' => 'Dashboard', - 'agency' => 'Agensi', + 'agency' => 'Profil Agensi', ]; diff --git a/resources/lang/id/validation.php b/resources/lang/id/validation.php index cececa2..f776e0e 100644 --- a/resources/lang/id/validation.php +++ b/resources/lang/id/validation.php @@ -34,6 +34,7 @@ return [ "different" => "Isian :attribute dan :other harus berbeda.", "digits" => "Isian :attribute harus berupa angka :digits.", "digits_between" => "Isian :attribute harus antara angka :min dan :max.", + 'dimensions' => 'Dimensi file gambar :attribute tidak sesuai.', "email" => "Isian :attribute harus berupa alamat surel yang valid.", "exists" => "Isian :attribute yang dipilih tidak valid.", "filled" => "Bidang isian :attribute wajib diisi.", diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index fdc3da9..5d4705b 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -6,7 +6,7 @@ @include('flash::message')
{!! appLogoImage() !!} -

{{ Option::get('app_name','Aplikasi Laravel') }}

+

{{ config('app.name') }}

{{ Form::open(['route'=>'auth.login']) }} diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php index 6bee2ce..f9e2e91 100644 --- a/resources/views/auth/register.blade.php +++ b/resources/views/auth/register.blade.php @@ -8,7 +8,7 @@
{!! appLogoImage(['style' => 'width:150px']) !!} -

{{ Option::get('app_name','Aplikasi Laravel') }}

+

{{ config('app.name') }}


{!! Form::open(['route' => 'app.install', 'class' => '']) !!} @@ -39,7 +39,6 @@
{!! Form::submit(trans('auth.register'), ['class' => 'btn btn-success']) !!} - {!! link_to_route('auth.login', trans('auth.have_an_account'), [], ['class' => 'btn btn-link pull-right']) !!}
{!! Form::close() !!}
diff --git a/resources/views/layouts/guest.blade.php b/resources/views/layouts/guest.blade.php index d64d00e..d521114 100755 --- a/resources/views/layouts/guest.blade.php +++ b/resources/views/layouts/guest.blade.php @@ -7,7 +7,7 @@ - @yield('title', Option::get('app_name', 'Aplikasi Laravel')) + @yield('title', config('app.name')) {!! Html::style('assets/css/app.css') !!} @yield('ext_css') diff --git a/resources/views/layouts/partials/footer.blade.php b/resources/views/layouts/partials/footer.blade.php index cf4e979..62afaaf 100755 --- a/resources/views/layouts/partials/footer.blade.php +++ b/resources/views/layouts/partials/footer.blade.php @@ -1,7 +1,10 @@ diff --git a/resources/views/layouts/partials/sidebar.blade.php b/resources/views/layouts/partials/sidebar.blade.php index 384aee8..6addab1 100755 --- a/resources/views/layouts/partials/sidebar.blade.php +++ b/resources/views/layouts/partials/sidebar.blade.php @@ -11,7 +11,7 @@