Giter Site home page Giter Site logo

laravel-create's People

Contributors

adhikasp avatar ajthinking avatar dependabot[bot] avatar niladam avatar septio avatar

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laravel-create's Issues

belongsToMany vs hasMany

At the moment these doesn't always get it right,
i suggest a scheme where the first word is the "owner", and the second is the "child"

Example:
cart_product

Cart HasMany Products
Product BelongsTo Cart

failed to open stream: Permission denied

After I cloned my github repo into my ubuntu server, it kept giving me this error for some reason, I know it's a permission error but I cannot figure out where exactly is the file that lacks the right permissions, anyone with a solution?

copy(/var/www/html/emailplat/emailplat/public/vendor/pipe-dream/laravel/data/.gitignore): failed to open stream: Permission denied

How to implement 'enum' datatype with default value in 'Object Model' ?

Trying to add enum datatype for 'gender' field that requires values 'male' and 'female' which can easily be achieved by 'enum' data type but it's not mentioned in 'object model' as well as in templates. the default value will be appreciated :)

One more thing it's not working in windows 7. Here are some screenshots

build
console
review
settings

Thanks for the unique package 👍

Save the sketch to localstorage

Hi!

So far loving this package. Although I have not been able to use it without some anxiety of accidentally refreshing/closing the page! All contents of my sketch will dissapear and I will have to start over (yes, i could copy it over to a backup file constantly, but that isn't very nice now is it). So here's the simple suggestion: automatically store the sketch in localstorage so that we don't have to fear refreshing the page.

I didn't get the meaning of reverseHistory

Hi, this is an awesome project. After refresh brower and build a new model, I found I had lost all my previous models. It's for the reason of reverseHistory. and I can't disable it.

so would it be better to remove this feature? I didn't get the meaning of reverseHistory.

Kind regards from china

Help button wipes work on sketch

steps:
1 write something in the sketch and then click help button. It replaces the content of the sketch without warning.

  • OS, browser: Windows 10, Chrome
  • pipe-dream version: ^0.0.71

"No files yet!" in review tab

I am getting same issue (closed) #34

Hi, I just installed it today (23-June-2019) and I am getting issue "No files yet!" in review tab and "No files to build yet" in Build tab.

Windows 10
Laravel 5.8 (clean install)
PipeDream 0.0.46

Note:
When I run php artisan serve, and use url http://localhost:8000/pipe-dream then it works fine. But when I open without php artisan serve and use url http://localhost/myproject/public/pipe-dream then this I faced this issue.

Thanks

Make each model's "child files" foldable

At the moment each "model" have tons of files:
controller
APIcontroller
resource
resourceCollection
migration
seed
factory
model

I suggest that all of these should be "collapseable" into their own group.

So a model named "Car" would have all of their files under that name. Look at just the sample app there are 28 files to look through, if we grouped them up, it would be so much easier to navigate through.

Have you checked Infyom?

Hello, Thanks for creating this repository.
But there is a similar project which is older and got tons of features called Infyom. Did you see their work? Is this project gonna offer something that they don't?

Add a tab/place for easy-installing the most popular laravel composer packages

A lot of times after installing a new application the same recurring packages are installed that are just "essential" for every laravel development environment.

Examples:
laravelbarryvdh/laravel-debugbar
laravel/envoy
laravel/horizon
predis/predis
guzzlehttp/guzzle

And this is just a simple list, but you get the idea, just check which packages you want installed and pipe-dream/laravel will do the rest!

API path not working in laravel 6.6.2

Hey
I love this package, you made my life easier!

While the api path is app/Http/Controllers/API like this:
image
Still they are in the controllers directory:
image

Not sure if it's my mistake or it's a bug.

Default user and reset password migration removed

I installed the pipe dream in an existing project.
But I did not use the +USER SYSTEM option just created a single model and after building the module, my user and password_reset migration removed.

Thanks for the package :)

*LOVE* the package/idea. Some suggestions and is it possible to donate time/money?

Anders,

Thank you for creating this project. Very excited for it as I can see the power of it and the future potential. I love the smart defaults and behaviours (auto id, timestamps, joins, etc).

I'm assuming this would be more useful for new projects than additional ones. But it would be great if you can take an already existing schema and import into pipedream so you can build on top of it. I know this is not an easy task but would allow a much larger number of users the ability to use this library.

Secondly, while I agree your naming conventions make sense and your ability to intelligently guess the variable type, it would be great to add very simple syntax so that we can add our expected variable types and other behaviours:

take this schema:

Car
name > VARCHAR(100)
brand_id

Driver
fullName > VC(50) - required,min:5 // you can provide/allow for abbreviated column types
yearsOfExperience > Unsigned tinyINT * 
numberOfCollisions > Unsigned tinyInt *
email - email,required 
address !
driver_car

I've added for instance above 4 syntactical elements:

  • > which allows developers to expeclicity set column types
  • * which allows developers to indicate this field as fillable
  • - which allows developers to add validation rules (the rules can be a static class variable)
  • ! add this field to the model's hidden array.

Obviously there are more possible elements such as these and yes it is possible to individually change them in the JSON but I feel like this would make your already amazing library into something very powerful. The key is to make sure that these optional elements are very easy to use (like the library).

Thank you very much and have a great day.

Frontend?

The pipedream.ai website says:

Create backend and frontend code in minutes using a simple sketch syntax. Get best practice predictions from 300 000 github repositories.

I am looking for how to create frontend code with pipedream.

Can someone help me find it?

Add acceptance tests feature at the creation of the code

Hi. First of all, I want to congrats the team on the effort of this awesome package. Can we have a feature to enable the acceptance tests of the controllers created from the schema? I think it's good to we've the acceptance tests just in time.

Best regards,
Calvin.

Add user system button should scaffold template files

First of all I want to tell you that this is an amazing idea!

I think that the "+ user system" button should also scaffold all views and styles, like "php artisan make:auth" does. Maybe also making it optional would be nice. What do you think about this?

Laravel 6 cant generate templates file

In the laravel 6 i try to publish templates but cant generate any template
in 5.8 it was working
this is command to publish template i am using ( php artisan vendor:publish --tag=templates )

Cursor pointer

Thanks for impressive work. 👏 This will surely greatly speed up mocking new projects!! 👍

Cursor pointer when hovering the nav tabs would increase userfriendlieness a lot! 👆

https://tailwindcss.com/docs/cursor/#pointer

Tried to make PR but failed due to:
fatal: Authentication failed for 'https://[email protected]/pipe-dream/laravel.git/'

... maybe my fault I don't know but to tired to investigate but thought I'd leave it here if someone else reports the same issue.

Again, impressive and congratulations to the release!!! 🎉

*** PUSHING TOWARDS NEXT VERSION ***

Next version 🚀

This thread is for all contributors, want-to-be-contributors and also in specific response to @septIO and @adhikasp to discuss how to get to the next version of the pipe dream platform.

Roadmap

Preliminary time frames (open for discussion):

version info when
alpha this repo at its current state Released June 2019
beta 1 implementation of the new platform including laravel support September 2019
beta 2 implementation of an additional 1-3 languages/frameworks October 2019
V1 more advanced features 2020

Baseline / scope

We need to setup a scope all the way to beta 2 (with V1 somewhat in mind). How can we do that? The Trello board could potentially act as a guide using the columns:

  • IDEAS = things to be decided on
  • QUEUED FOR BETA = minimum scope
  • POSTPONED TO V1 = cool ideas to keep for later

But I'm sure there are better ways? Illustrations/wireframes? Feature list in google sheets? Suggestions needed!

Rewrite suggestions

make core/other module a proper ES6 module with webpack build, so we don't need to write workaround for things like jest and file loader.

This sounds good, I'm not that experienced with how to export the packages in a modular way, Im sure there are a lot of room for improvement from the initial package setup. 👍

... Core rewrite? I’ve read through it, and i see alot of optimization options, and some class/file names doesn’t always make sense as to what they do. I would also like to abstract each component further (as discussed on the GitHub issue). What are your thoughts of writing the core in TypeScript to ensure typesafety, and use some of the better parts of TypeScript such as private properties/methods, interfaces, traits etc.

I think we should pursue high quality, and all of this sounds like good ideas! 👍

Collaboration channels

resource purpose
Trello Overview work planning
Issues in this or other repos Detailed issue/dev discussion, since better than trello (?)
pipedream docs User/Developer docs + platform overview

Pipe Dream is in a way abstractions of abstractions and I have a hard time wrapping my head around it all. I usually do a lot of sketches in a physical notepad, but thats not good enough. Maybe we also need some kind of vector modeling tool to explain ideas and make them commitable for documentation. Any ideas? I tried draw.io which is cool but maybe not that smart for application development?


In general: how can we optimize the journey towards next version? What do you need? I'd really apprechiate your input and ideas! Thanks 😅

Maybe should switch to something like JDL

Hi there !

I was trying to POC a way to implements validation rules for the fields but couldn't find the right way to write it in the first place.
Indeed, if we start to implement validation rules, we'll sure implement a all lot of other things.
Then I remembered JDL. According to jhipster.tech/jdl :

The JDL is a JHipster specific domain language where you can describe all your applications, deployments, entities and their relationships in a single file (or more than one) with a simple and user-friendly syntax.

It looks like that :

entity Post {
	title String required minlength(5)
    content TextBlob required min(150)
}

entity Comment {
	content TextBlob required min(10)
}

relationship ManyToOne {
	Post{user(login)} to User,
    Comment{user(login)} to User,
}

relationship OneToMany {
	Post{comment(comment) required} to Comment
}

paginate Post, Comment with infinite-scroll`

Maybe should we specify a Pipe Dream Domain Language.

It could not only describe all entities and relations but also commands to run, packages to install, etc.

What do you think ?

Getting " No files yet!" in the review tab after writing the sketch

After writing any sketch ( or even using the sample one), I cans see that the json schema getting updated. However when I ever visit the "Review" or "Build" tab I get an empty page with "No files yet!"

MacOS Mojave 10.14.5
Laravel 5.8 (clean install)
PipeDream 0.0.45

Thank you!

Broken in Laravel 7

In a fresh install of Laravel 7 you get a white screen due to a failure to load vendor JS & CSS resources

Carriage Return in names

"User\r"

I copied the sketch in notepad++ as to not to lose my work. When I copied it abck in the sketch window it had the carriage return character r in all the names.

chrome_gNoUSK8xfw

  • OS, browser: W10, Chrome
  • pipe-dream version: ^0.0.71

Replacing Route::resource with Route::apiResource

Hi

I think it would be better to replace this (automatically created by this package)

Route::resource('sliderLinks', 'SliderLinkAPIController', [
    'only' => ['index', 'show', 'store', 'update', 'destroy']
]);

with this:

Route::apiResource('sliderLinks', 'SliderLinkAPIController');

softdeletes doesn't work

When i add 'softdeletes' to a model it doesn't create the deleted_at field it just creates a text field softdeletes,wasn't it was added in v0.0.73?

system

windows 10 1909
xampp
php 7.3
"laravel/framework": "^6.2",
"pipe-dream/laravel-create": "^0.1.2",

input

Car
softdeletes
brand
color
user_id

Garage
location
capacity

car_garage

User
name
email
email_verified_at
password
remember_token

password_resets
email
token

output

[
    {
        "name": "Car",
        "type": "ModelEntity",
        "attributes": {
            "id": {
                "name": "id",
                "cast": null,
                "dataType": "bigIncrements",
                "fillable": false,
                "hidden": false,
                "index": false,
                "nullable": false,
                "unique": false,
                "foreign": null
            },
            "softdeletes": {
                "name": "softdeletes",
                "cast": null,
                "dataType": "string",
                "fillable": true,
                "hidden": false,
                "index": false,
                "nullable": false,
                "unique": false,
                "foreign": null
            },
            "brand": {
                "name": "brand",
                "cast": null,
                "dataType": "string",
                "fillable": true,
                "hidden": false,
                "index": false,
                "nullable": false,
                "unique": false,
                "foreign": null
            },
            "color": {
                "name": "color",
                "cast": null,
                "dataType": "string",
                "fillable": true,
                "hidden": false,
                "index": false,
                "nullable": false,
                "unique": false,
                "foreign": null
            },
            "user_id": {
                "name": "user_id",
                "cast": null,
                "dataType": "unsignedBigInteger",
                "fillable": true,
                "hidden": false,
                "index": false,
                "nullable": true,
                "unique": false,
                "foreign": "users"
            },
            "created_at": {
                "name": "created_at",
                "cast": null,
                "dataType": "timestamp",
                "fillable": false,
                "hidden": false,
                "index": false,
                "nullable": true,
                "unique": false,
                "foreign": null
            },
            "updated_at": {
                "name": "updated_at",
                "cast": null,
                "dataType": "timestamp",
                "fillable": false,
                "hidden": false,
                "index": false,
                "nullable": true,
                "unique": false,
                "foreign": null
            }
        },
        "relationships": {
            "hasOne": [],
            "hasMany": [],
            "belongsTo": [
                "User"
            ],
            "belongsToMany": [
                "Garage"
            ]
        }
    },
    {
        "name": "Garage",
        "type": "ModelEntity",
        "attributes": {
            "id": {
                "name": "id",
                "cast": null,
                "dataType": "bigIncrements",
                "fillable": false,
                "hidden": false,
                "index": false,
                "nullable": false,
                "unique": false,
                "foreign": null
            },
            "location": {
                "name": "location",
                "cast": null,
                "dataType": "string",
                "fillable": true,
                "hidden": false,
                "index": false,
                "nullable": false,
                "unique": false,
                "foreign": null
            },
            "capacity": {
                "name": "capacity",
                "cast": null,
                "dataType": "string",
                "fillable": true,
                "hidden": false,
                "index": false,
                "nullable": false,
                "unique": false,
                "foreign": null
            },
            "created_at": {
                "name": "created_at",
                "cast": null,
                "dataType": "timestamp",
                "fillable": false,
                "hidden": false,
                "index": false,
                "nullable": true,
                "unique": false,
                "foreign": null
            },
            "updated_at": {
                "name": "updated_at",
                "cast": null,
                "dataType": "timestamp",
                "fillable": false,
                "hidden": false,
                "index": false,
                "nullable": true,
                "unique": false,
                "foreign": null
            }
        },
        "relationships": {
            "hasOne": [],
            "hasMany": [],
            "belongsTo": [],
            "belongsToMany": [
                "Car"
            ]
        }
    },
    {
        "name": "car_garage",
        "type": "PivotTableEntity",
        "attributes": {
            "id": {
                "name": "id",
                "cast": null,
                "dataType": "bigIncrements",
                "fillable": false,
                "hidden": false,
                "index": false,
                "nullable": false,
                "unique": false,
                "foreign": null
            },
            "created_at": {
                "name": "created_at",
                "cast": null,
                "dataType": "timestamp",
                "fillable": false,
                "hidden": false,
                "index": false,
                "nullable": true,
                "unique": false,
                "foreign": null
            },
            "updated_at": {
                "name": "updated_at",
                "cast": null,
                "dataType": "timestamp",
                "fillable": false,
                "hidden": false,
                "index": false,
                "nullable": true,
                "unique": false,
                "foreign": null
            },
            "car_id": {
                "name": "car_id",
                "cast": null,
                "dataType": "unsignedBigInteger",
                "fillable": true,
                "hidden": false,
                "index": false,
                "nullable": true,
                "unique": false,
                "foreign": "cars"
            },
            "garage_id": {
                "name": "garage_id",
                "cast": null,
                "dataType": "unsignedBigInteger",
                "fillable": true,
                "hidden": false,
                "index": false,
                "nullable": true,
                "unique": false,
                "foreign": "garages"
            }
        },
        "relationships": {
            "hasOne": [],
            "hasMany": [],
            "belongsTo": [],
            "belongsToMany": []
        }
    },
    {
        "name": "User",
        "type": "UserEntity",
        "attributes": {
            "id": {
                "name": "id",
                "cast": null,
                "dataType": "bigIncrements",
                "fillable": false,
                "hidden": false,
                "index": false,
                "nullable": false,
                "unique": false,
                "foreign": null
            },
            "name": {
                "name": "name",
                "cast": null,
                "dataType": "string",
                "fillable": true,
                "hidden": false,
                "index": false,
                "nullable": false,
                "unique": false,
                "foreign": null
            },
            "email": {
                "name": "email",
                "cast": null,
                "dataType": "string",
                "fillable": true,
                "hidden": false,
                "index": false,
                "nullable": false,
                "unique": true,
                "foreign": null
            },
            "email_verified_at": {
                "name": "email_verified_at",
                "cast": "datetime",
                "dataType": "timestamp",
                "fillable": false,
                "hidden": false,
                "index": false,
                "nullable": true,
                "unique": false,
                "foreign": null
            },
            "password": {
                "name": "password",
                "cast": null,
                "dataType": "string",
                "fillable": true,
                "hidden": true,
                "index": false,
                "nullable": false,
                "unique": false,
                "foreign": null
            },
            "remember_token": {
                "name": "remember_token",
                "cast": null,
                "dataType": "string",
                "fillable": false,
                "hidden": true,
                "index": false,
                "nullable": true,
                "unique": false,
                "foreign": null
            },
            "created_at": {
                "name": "created_at",
                "cast": null,
                "dataType": "timestamp",
                "fillable": false,
                "hidden": false,
                "index": false,
                "nullable": true,
                "unique": false,
                "foreign": null
            },
            "updated_at": {
                "name": "updated_at",
                "cast": null,
                "dataType": "timestamp",
                "fillable": false,
                "hidden": false,
                "index": false,
                "nullable": true,
                "unique": false,
                "foreign": null
            }
        },
        "relationships": {
            "hasOne": [],
            "hasMany": [
                "Car"
            ],
            "belongsTo": [],
            "belongsToMany": []
        }
    },
    {
        "name": "password_resets",
        "type": "TableEntity",
        "attributes": {
            "id": {
                "name": "id",
                "cast": null,
                "dataType": "bigIncrements",
                "fillable": false,
                "hidden": false,
                "index": false,
                "nullable": false,
                "unique": false,
                "foreign": null
            },
            "email": {
                "name": "email",
                "cast": null,
                "dataType": "string",
                "fillable": true,
                "hidden": false,
                "index": false,
                "nullable": false,
                "unique": false,
                "foreign": null
            },
            "token": {
                "name": "token",
                "cast": null,
                "dataType": "string",
                "fillable": true,
                "hidden": false,
                "index": false,
                "nullable": false,
                "unique": false,
                "foreign": null
            },
            "created_at": {
                "name": "created_at",
                "cast": null,
                "dataType": "timestamp",
                "fillable": false,
                "hidden": false,
                "index": false,
                "nullable": true,
                "unique": false,
                "foreign": null
            },
            "updated_at": {
                "name": "updated_at",
                "cast": null,
                "dataType": "timestamp",
                "fillable": false,
                "hidden": false,
                "index": false,
                "nullable": true,
                "unique": false,
                "foreign": null
            }
        },
        "relationships": {
            "hasOne": [],
            "hasMany": [],
            "belongsTo": [],
            "belongsToMany": []
        }
    }
]

Want to contribute to the project

Hi,
I have much experience with code generators for vanilla php.
But with laravel this is my first time that I wanted to make code generation tools.
I came across laravel-create and I like it. But I would like to extend it to add my own ideas.

As I told I do not have experience with generating for laravel, I just searched laravel create, but could find the best place to extend it with my ideas.

Can you please tell me which files do I need to modify?

Once I get on to the track with what you have done, I will for sure contribute very much to laravel-create.

Thanks

Some suggestions and a bug

Hi, first of all I'm sorry about the vague title (as a regular bug-report-submitter I'm ashamed).

Some (useless) context I loved the idea and your work the second I saw it on reddit (I'm not registered there so couldn't put this in that thread).

I wanted to try it ASAP so I fired a laravel new and fired up the /pipe-dream url and then I found some things that didn't allow me to use it as-is without some changes, other stuff were impossible with just changing the templates:

  1. Please make an easier way to specify the models' namespace (some like their models grouped in App\Models (like us here))
    1.1. It'd be cleaner to have all API controllers inside an App\Http\Controllers\API namespace as well (but I could live without this one)
  2. Use model binding by default and load relationships with just (return $model->load($rels))
  3. [bug] If I ctrl+z (to revert a change I made) in the templates window - it wipes out the entire input
  4. ___CASTS_BLOCK___ is missing from Model but you do replace it in ModelPipe.js

Thanks in advance! I hope to be using this tool in the future and forever!

Let us manually change the order of migrations

Currently the order is automatically chosen to make sure that reference tables are made before the reference is declared on another table. This doesn't always work.

Can we make it so that we can manually change the order in the Preview area?

DataTypes not resolving from __GITHUB_DUMP__

Tried out the supplied sample (e.g. with Car, Garage, etc.).

Observed that Garage attribute capacity has dataType of 'string', instead of 'integer' which was expected (and can be observed in the 2 minute demo video, where it was corrected to 'unsignedInteger').

Upon testing attributes that are present in the github.js dump, I observed that the dataType almost always default to 'string'. The ruled stuff seems to work, e.g. is_for_sale resolves to 'boolean'. But none of the github dumps work.

Tested on latest Laravel 6.14, Laravel 5.8, latest release of laravel-create (also tried older versions predating the move to core and laravel-file-creator, but to no avail.

Foreign Key relationship issue with bigIncrements

On creating a project with the default settings, I noticed that the users table was created with a bigIncrements index (as per laravel 5.8 standard) but the cars table user_id column that references the bigInt was created with just an unsignedInteger, meaning that migration failed.

Suggest to either default to increments for id columns or make sure foreign key relationships have the correct type.

Brill project btw already planning on using it on a new site build

Let us add more files after initial file creation

Currently you can set up you app, and then that's it. If we want to later make more models we'll have to add in the same sketch we used back then, make changes to the Schema and then to the templates (if any).

I want this to be possible (I'll check off items as they're implemented):

  • Add models whenever i want
  • Add functionality to already build files, eg. add phonenumber to users
  • Load in the sketch / schema i used to make my current app (including edits from step 2)

Allow model namespace declaration on the Object Model panel

It would be useful to be able to specify sub-level model namespaces via the sketch area on the Object Model panel.

I know there's a plan to add model namespacing (as per #5) however, on a larger application, I often find it useful to create deeper namespaces.

These defined namespaces could be offset from the base model directory as defined in the FileFactory modelNamespace setting

As an example, assuming you've defined a model namespace as App\Models and the build would place new models in app/Models then defining a model as Users\Contractor would create a Contractor model in the app\Models\Users directory with the namespace App\Models\Users.

The one issue with this is how you manage relationships, but that could possibly be rectified by adding the ability to specify the model used for a foreign key.

e.g. with something like contractor_id:Users\Contractor

Default user system remember_token not nullable

When adding the user system to the sketch, the remember_token isn't set to nullable => true.

I think it should be set to true by default otherwise it will cause errors !

(sorry for my trashy english !!!)

Add validator files

Also add the validator files that will be inside app/Http/Requests

An example would be:

Car
id
name => required|min:3|max:255

And we would have a CarRequest.php file more or less like this:

<?php
 
namespace App\Http\Requests;
 
use Illuminate\Foundation\Http\FormRequest;
 
class CarRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }
 
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'name' => 'required|min:3|max:255'
        ];
    }
 
    /**
     * Mensagens caso pare nos rules atribuidos
     * @return array
     */
    public function messages() {
        return [
            'name.required' => 'The :attribute is required',
            'name.min' => 'The :attribute ... :min',        
            'name.max' => 'The :attribute .... :max',
        ];
    }
}

Closure on route blocks caching routes

Since Closures can not be serialized, you can not cache your routes when you have routes which use closures.

on command artisan route:cache we get the following:

 LogicException

  Unable to prepare route [pipe-dream/api/save] for serialization. Uses Closure.

  at vendor/laravel/framework/src/Illuminate/Routing/Route.php:1054

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.