adr1enbe4udou1n / laravel-boilerplate Goto Github PK
View Code? Open in Web Editor NEWLaravel 5.7 Boilerplate based on Bootstrap 4 and Vue Tabler for Backend.
Home Page: https://laravel-boilerplate.okami101.io
License: MIT License
Laravel 5.7 Boilerplate based on Bootstrap 4 and Vue Tabler for Backend.
Home Page: https://laravel-boilerplate.okami101.io
License: MIT License
I guess we all will run yarn && yarn dev for development and corresponding commands for build. So whenever you push updates I don't think they needed to be added in version control.
Yes package.json composer.lock file should be version controlled but i guess those generated files shouldn't be in version control.
Why?
Generating optimized autoload files
Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover
In Application.php line 637:
Class 'Laravel\Dusk\DuskServiceProvider' not found
on a fresh install after running composer install --no-dev --optimize-autoloader
You have a great boilerplate here. I was able to get the 2.4 release setup but I am trying to get master branch setup; as i think its what your demo links are running and would be nice to use.
The issue is that i get a page that looks like this:
I have done
AccountRepository
at __construct()
method there are following lines of codes $view->composer('*', function (\Illuminate\View\View $view) {
$locales = collect($this->localization->getSupportedLocales())->map(function ($item) {
return $item['native'];
});
$view->withLocales($locales)->withTimezones(\DateTimeZone::listIdentifiers());
});
Are above lines of codes needed to be inside account repository? I guess it should be inside ComposerServiceProvider
, isn't it?
And in FrontendController i guess there are redundant comments like
/** @var TagRepository $tags */
Aren't such comments redundant?
In HasEditorTrait currently we are tagging all editor media as editor images
. But I guess we should be flexible here.
I guess we have used following in various places
property_exists($this, 'translatable') && in_array($field, $this->translatable, true)
i guess we can add it to BaseModel like that?
AccountRepositry
inside update method there are following lines if ($this->query()->whereEmail($user->email)->exists()) {
throw new GeneralException(__('exceptions.frontend.user.email_taken'));
}
Aren't unique email already checked by validation rules using Laravel Form Request
And I think property $asYouType is not needed in post model? isn't it?
I would PR these but I may be mistaken as you have always been maintaining this beautiful project.
Hi Again,
I am trying to debug the lag on loading the app and noticed the vendor js files built by webpack to be > 2mb is there much that can be done to bring that size down? I am not too familiar with webpack usage yet.
Hello
While I'm trying to RTL the style of the project I found some usage of pull-right which is deprecated in bootstrap-4 but it's still exist in fontawesome (for this reason it still working) but also deprecated in version 4.4 of fa so it's nice to change theme to float-right
Thanks
There are lots of redundant things . Can I PR it and fix it?
Hey there,
I am having an issue creating new Models/Repos and getting them to save. ( i am using the 2.4 release )
basically this is the setup i have: a new route, it points to a new controller and when i try to inject the new Repository (based off the metaRepo) I am getting the following error. can you shoot me an email : mzummo [/@/] gmail.com. I feel i have a typo somewhere something super easy that i overlooked
I copied everything from meta Model and Repo exactly (so i thought) minus a few things and changes:
BindingResolutionException
Target [App\Repositories\Contracts\CourtCaseRepository] is not instantiable while building [App\Http\Controllers\Backend\CaseController].
Hello,
I got loads of this :
I think the issue will be solved if I change https://localhost:8080 to my virtualhost domain ( https://example.dev) for instance ?
How would I do that ?
Thanks
There are some problem and i am receiving warnings . After running npm run
dev i see following .
yarn run v1.6.0
(node:63097) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
$ npm run clean && webpack-dev-server --mode development --hot --progress
> @ clean /Users/shirshak/Desktop/projects/boldscholar
> rimraf public/build
[1] building modulesDEPRECATION WARNING on line 10, column 8 of stdin:
Including .css files with @import is non-standard behaviour which will be removed in future versions of LibSass.
Use a custom importer to maintain this behaviour. Check your implementations documentation on how to create a custom importer.
DEPRECATION WARNING on line 15, column 8 of stdin:
Including .css files with @import is non-standard behaviour which will be removed in future versions of LibSass.
Use a custom importer to maintain this behaviour. Check your implementations documentation on how to create a custom importer.
DEPRECATION WARNING on line 12, column 8 of stdin:
Including .css files with @import is non-standard behaviour which will be removed in future versions of LibSass.
Use a custom importer to maintain this behaviour. Check your implementations documentation on how to create a custom importer.
DEPRECATION WARNING on line 18, column 8 of stdin:
Including .css files with @import is non-standard behaviour which will be removed in future versions of LibSass.
Use a custom importer to maintain this behaviour. Check your implementations documentation on how to create a custom importer.
[0] emitting
DONE Compiled successfully in 15256ms 10:25:44 PM
[1]
DONE Compiled successfully in 15654ms 10:25:44 PM
0% [0]
And it shows 0% [0]
which don't make any sense
Why?
Possible Problem?
Currently we are using user with id 1 as superuser. But i guess there are plenty of solution :D
On fresh installation i see :
Package phpoffice/phpexcel is abandoned, you should avoid using it. Use phpoffice/phpspreadsheet instead.
I guess we need to change that so we would be more future proof right?
installed on local machine.
can't to add user and posts.
Error Notifiaction: Action not allowed
when i tried to add an user or edit posts -> nothing happens
as Super Admin i get an Server exception Notification
I guess in that component it is not referenced and is only defined ?
this one
async deleteRow (params) {
let result = await window.swal({
title: this.$t('labels.are_you_sure'),
type: 'warning',
showCancelButton: true,
cancelButtonText: this.$t('buttons.cancel'),
confirmButtonColor: '#dd4b39',
confirmButtonText: this.$t('buttons.delete')
})
if (result.value) {
try {
let {data} = await axios.delete(this.$app.route(this.deleteRoute, params))
this.onContextChanged()
this.$app.noty[data.status](data.message)
} catch (e) {
this.$app.error(e)
}
}
},
When creating a post text is inputted like below:
`t
s
e
t`
It always says app mailer not found in production don't know what is happening
I am going to PR all of these. Can you look which which feature you don't want?
https://github.com/bloggervista/laravel-boilerplate/projects/1
As spatie translatable used a single field for storing translate it will be easier to work on and extra table is not essential . Plus it is maintained properly.
If you plan to use it I can submit PR for it.
reCaptcha is not workig. I got error in chrome console:
"recaptcha__en.js:61 Uncaught undefined" ...
My solution is put
{!! Captcha::script() !!}
to before </head>
tag.
Google documentation say: "Paste this snippet before the closing tag on your HTML template:"
Hi,
Your demo site is not working, the administration page throws following error
index.js:4 Uncaught ReferenceError: LIB_VERSION is not defined
at Object.UlOv (index.js:4)
at o (bootstrap f0ffbbae6c894842955b:54)
at Object.YVUD (Search.vue:25)
at o (bootstrap f0ffbbae6c894842955b:54)
at Object.1 (backend.fe9554f2f51fe7cedb14.js:1)
at o (bootstrap f0ffbbae6c894842955b:54)
at window.webpackJsonp (bootstrap f0ffbbae6c894842955b:25)
at backend.fe9554f2f51fe7cedb14.js:1
You need to update the vue-chartjs to v3.2.1
I guess now its time to switch to tabler.
https://tabler.github.io/tabler/
Why?
Why not to switch?
Thanks.
Been trying to get this going locally but the recaptcha error
Cannot contact reCAPTCHA. Check your connection and try again.
prevents me. Have generated a new key/secret for my dev site and updated .env
any ideas?
Whenever I'm trying to add style section to any vue file I get an error like this:
Module parse failed: Unexpected token (...)
You may need an appropriate loader to handle this file type.
So I cann't use style section an any vue component
Hello,
Is the imagecache folder being created automatically or do i have to create it manually ?
Regards
Sergiu C.
I guess instead of heroku now we can use docker and I guess docker is popular in laravel community as well?
Do you have anything to say about docker?
Thanks
Forbidden
You don't have permission to access /storage/803/abstract-8.jpg on this server.
Apache/2.4.10 (Debian) Server at laravelcms.dev Port 443
Any ideas about this ?
I already put recursive 777 permission on storage folder. What else could be ?
Thanks
As i go backend it will take 500-600ms and it shows normally. Its like initial flick as js is loading. I guess we can improve it by server side rendering and as we don't use Laravel Mix i guess its easy too :)
Have a say :)
There is documentations as well as video in youtube also in codecourse
Thank You.
Hey bro,
I am messing with the htmlBuilder and the yarja datatable ... I am having issue though where it doesnt seem to be makign the post request to get the table data was wondering if there is something i am missing that tells the datatable to update and do the post call
I guess there is no reason to run manifest.[hash].js file in production right?
First thanks for boilerplate and this is just a enhancement related issue :)
If you got time can we think about changing planks mediable to spatie media library?
Why To Implement?
Why not to implement?
In any sense I don't mean plank is not good. It used to be good but now it only has bug fix updates no new features.
Thanks.
At EloquentAccountRepository
public function update(array $input)
{
if (! config('account.updating_enabled')) {
throw new GeneralException(__('exceptions.frontend.user.updating_disabled'));
}
$user = auth()->user();
/** @var User $user */
$user = $this->query()->find($user->id);
Isn't auth()->user()
and $this->query()->find($user->id)
same? They both give instance of User Model?
Thanks
Abit off topic.
During development of react version of same package I find using various modules like Blog, SEO, Settings will make clean code and will be easier to read for future developers
can you share is it good to go with that approach?
Hello
While I'm using the command yarn watch
it generates the final css, js and manifest files at the first time but if I changed any thing related to scss files only new manifest file get generated without any new css files backend or frontend while if I changed any thing related to js (js, vue) then both manifest and js files get generated so it's ok and the problem is only related to scss files as I think.
This happens for both development and production environments (build and dist folders).
Thanks
I guess we will need it one as it is very good to do decouple unwanted for certain things. Suppose if don't want Blog i need to remove them from route folder, controller folder and many place. There can be left overs as well.
If we use module I guess it will be very good design ? What do you say?
And every controllers, requests, routes, vue files etc go to its own folder like "Blog". Right?
Playing around with emails on the contact form and I am not able to do so ( to send email ) because in event :
FormSubmissionEventListener->onCreated is asking for FormSettings object ( currently is NULL ) and I couldnt figured our where it is being saved ?
* @param $event
*/
public function onCreated(FormSubmissionCreated $event)
{
Log::notice(__('logs.backend.form_submissions.created',
['form_submission' => $event->formSubmission->id]));
$formSetting = $this->formSettings->find($event->formSubmission->type);
// is always NULL and therefore the below code is not executed
if ($formSetting && ! empty($formSetting->recipients)) {
Mail::to($formSetting->array_recipients)
->send(new Contact($event->formSubmission));
}
}```
Any ideas ?
Thanks
Cant run with laravel api tester packget
Hi,
Sorry I am bit new to Laravel and here I am stuck. Will appreciate your help.
Basically I got Model called ProductCategory which can have subcategories. So in my model I have:
protected $with = [
'media',
'meta',
'parent',
'children',
];
public function parent()
{
return $this->belongsTo(self::class, 'parent_id');
}
public function children()
{
return $this->hasMany(self::class, 'parent_id');
}
Now the problem is that in ProductCategoryController->Show(...) function I am getting the parent object but in ProductCategoryController->Search(..) I dont.
Please see attachements .. they will make more sense.
Do you have any ideas ? ... I spent a few hours and I couldnt figure out :(
Thanks
Sergiu
Hello,
I came across to an issue when for instance you have a model name called "blog_category" so if in BlogCategoryForm.vue if you pass it as 'modelName': 'blog_category' then in mixins/form . the modelName in routes names becomes "blog_categorys" when it should be "blog_categories". which is not a plural correct and therefore messes things up because routes names are not "blog_categorys" but 'blog_categories' .Not sire if I have clearly explained my issue but if you're not getting it let me know I will come with some more details .
For me this is a bug
I guess we can add editor config so that we can match indentation etc like you want. And integration of styleci will ensure every file get properly format.
If you want that I can PR it with preset laravel so it remain consistent with framework.
And regarding the react version I am currently busy with too much work as I am financially weak. Seems like it will take around 2-3 weeks to complete. Do you think it is good to use redux ?
Thanks
I was just browsing casually and i think there is bug in edit post. You can check at link
https://laravel-boilerplate.okami101.io/admincp/posts/185/edit
As coreui support react and now recently it has changed licence to MIT i guess we need to make react. Yes I will help you of course. But wanted to know from your site if you can help me on some parts
Thank you
public function getCanEditAttribute()
{
return ! $this->is_super_admin || 1 === auth()->id();
}
Suppose I am User with id 1 as there is 1===1 is true and due to or this method will return true
Suppose I am User with id 2 .
$this->super_admin return false as 1 is not equal to 2 (according to getisSuperAdminAttribute()
)
so !$this->super_admin
will be true for user with id 2.
And i know ! operator has high precedence than OR .
Am i missing something??
I guess this should be
$this->is_super_admin || $this->id === auth()->id()
The above code sounds like this: The User can be edited by super user or current logged in user
Similar can be found is other methods also. Thanks
laravel-boilerplate/app/Models/User.php
Line 85 in 00639aa
At App\Models\Post
There is setUnPublishedAtAttribute()
method
When it is turned into snake case it would be
$post->un_published_at
So i guess it should be setUnpublishedAtAttribute()
right?
Thank You!
Years ago, I bootstrapped this log viewer: https://github.com/rap2hpoutre/laravel-log-viewer, now it's maintained by the community. I think it could be useful to add it into a boilerplate, since it's widely used and helps people in debugging. What do you think? Could it be usefull? Do you want me to send a PR?
Is there some issue with webpack whenever i run npm run dev
it shows
โ vue-boilerplate yarn dev
yarn run v1.5.1
$ npm run clean && webpack-dev-server --mode development --hot --progress
> @ clean /Users/shirshak/Desktop/projects/vue-boilerplate
> rimraf public/build
0% [1]
I mean it only shows 0% like that how ever it is merely a display problem i mean its working on frontend but its only a display problem
Schema::create('role_translations', function (Blueprint $table) {
$table->increments('id');
$table->integer('role_id')->unsigned();
$table->string('locale')->index();
$table->string('display_name')->nullable();
$table->string('description')->nullable();
$table->unique(['role_id', 'locale']);
$table->foreign('role_id')->references('id')
->on('roles') //changed from: role_translations to: roles
->onDelete('cascade');
});
Is this correct ?
can we use simple customization or there was necessity for this project?
database\migrations\2017_06_11_023718_create_meta_translations_table.php
PART of code:
public function up()
{
Schema::create('meta_translations', function (Blueprint $table) {
$table->increments('id');
$table->integer('meta_id')->unsigned();
$table->string('locale')->index();
$table->string('title')->nullable();
$table->text('description')->nullable();
$table->unique(['meta_id', 'locale']);
$table->foreign('meta_id')->references('id')
->on('metas') **//changed from: meta_translations to: metas
->onDelete('cascade');
});
}
Is this correct ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.