Giter VIP home page Giter VIP logo

laravel-boilerplate's Introduction

laravel-boilerplate's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laravel-boilerplate's Issues

Gitignore public/dist folder?

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?

  1. Because I and most people like to keep up with latest changes and sometimes those generated files makes abit difficult as we need to ignore many files
  2. Keeps project clean

Class 'Laravel\Dusk\DuskServiceProvider' not found

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

CSS rendering issue

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 $) npm install and ran $) yarn dev ... I dont get anything really at http://localhost:8080 where dev server is running

Refactoring?

  1. In 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?

  1. In HasEditorTrait currently we are tagging all editor media as editor images. But I guess we should be flexible here.

  2. 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?

  1. In 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.

  1. And as core ui is using pro and free version and there is lots of limitation i guess now its time to switch to another one . And yeah time is problem here. I hope i can PR it. Can we use
    https://github.com/tabler/tabler

large JS files

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.

Problem on doing RTL for the style

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

creating new Models/Repositories

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].

Fixing Webpack issues?

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

screen shot 2018-05-03 at 10 26 21 pm

Using UUID For Users, Blogpost etc..?

Why?

  1. Security, Security
  2. No need to worry about holes which occurs when we delete some records?

Possible Problem?
Currently we are using user with id 1 as superuser. But i guess there are plenty of solution :D

Changing Dependencies?

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?

can't edit users and posts

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

is deleteRow in backend/plugins/datatables.vue needed?

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)
        }
      }
    },

Text editor

When creating a post text is inputted like below:
`t

s

e

t`

Can we use Spatie Translatable

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 not work

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:"

Production administration not working

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

Switching Core Ui to Tabler?

I guess now its time to switch to tabler.
https://tabler.github.io/tabler/

Why?

  1. Looks more beautiful
  2. Core UI has too much limitation is free version . (I guess I am a bit rude as core ui has given so much free but tabler give us more ! Sorry Core UI)
  3. Backpack which is popular in laravel also seems to be intrested in switching to tabler soon :)

Why not to switch?

  1. Time

Thanks.

Recaptcha issue

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?

Stuck when seeding

Hello i clone this repo and everything works fine but when i go to --seed to the db it gets stuck seeding the tables, any ideas on why is that and how to fix it? Thanks, i did see the demo and it looks really great.

image

Error: Module parse failed

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

imagecache folder

Hello,

Is the imagecache folder being created automatically or do i have to create it manually ?

Regards
Sergiu C.

Docker support?

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

Adding Support for Server Side Rendering?

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.

getting datatables to update

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

Using Spatie Media Library instead of Plank?

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?

  1. Frequently updated
  2. More Features like multiple download, image generator like pdf version etc..
  3. Advance Features like ordering moving media.
  4. Flexible due to events etc.
  5. As it is of spatie more people will use it and people will be familiar with its api than that of plank

Why not to implement?

  1. Time

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.

Possible Redundancy?

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

Is it good to use module?

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?

watching assets changes

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

Using Modular Approach?

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?

FormSetting - where is the call to save it in DB ?

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

Get Relation data in Search results

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.
screen shot 2018-05-12 at 20 32 37
screen shot 2018-05-12 at 20 32 02

Do you have any ideas ? ... I spent a few hours and I couldnt figure out :(

Thanks
Sergiu

Handle modelName in Vue components ( form ) when plural of resource is not regular

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

screen shot 2018-05-07 at 22 56 36

screen shot 2018-05-07 at 22 56 01

Adding editor config and style ci integration?

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

Can we make react version also?

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

Confusion?

  1. Isn't this statement always return true?
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

return ! $this->is_super_admin || 1 === auth()->id();

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!

NPM Webpack display problem?

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
screen shot 2018-04-07 at 3 35 43 pm

database/migrations/2017_05_30_193000_setup_permissions_tables.php

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 mix?

can we use simple customization or there was necessity for this project?

database\migrations meta_translations_table.php

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 ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.