Comments (2)
OK so I just digged into the blueprint source code. And finally found out that it was all lower case softdeletes
and I assigned value true
to it. This way it worked. I had followed all the documentation and in this issue #39 for blueprint where I got the softDeletes
word. So I had just followed that.
Now I got it with success. Here is my yaml file:
models:
Salesperson:
name: string:255
f_name: string:255
dob: date
address: string:400
softdeletes: true
controllers:
Salesperson:
index:
query: all
render: salesperson.index with:salespeople
create:
render: salesperson.create
store:
validate: name, f_name
save: salesperson
flash: salesperson.name
redirect: salesperson.index
show:
render: salesperson.show with:salesperson
edit:
render: salesperson.edit with:salesperson
update:
validate: name, f_name
update: salesperson
flash: salesperson.name
redirect: salesperson.index
destroy:
delete: salesperson
redirect: salesperson.index
and here is the screenshot after execution:
from blueprint.
Yes, Blueprint uses some shorthands which are technically invalid YAML syntax. These were for developer convenience.
To enable soft deletes for a model, you can simply write: softDeletes
or softdeletes
, or to write valid YAML: softDeletes: true
or softdeletes: true
from blueprint.
Related Issues (20)
- Cannot set primary key, column always sticking to integer column HOT 8
- Separated enum values are not working well HOT 1
- Support for multiple `send` key items for controllers HOT 10
- Add type hints to event classes
- Support for constructor property promotion
- Generate Laravel Nova Resources HOT 1
- Update PHPUnit test generation for PHPUnit 10
- Ability to add connection/table name in model HOT 2
- Model attribute called `cast` is being double-quoted in generated code HOT 2
- Enhanced Syntax and Behavior for `hasOneThrough` and `hasManyThrough` Relationships in Laravel's Eloquent ORM HOT 4
- Natural Keys For relationships HOT 9
- Global package so I can use it like Laravel pint HOT 3
- Add `HasUuids` trait when Model has `id uuid primary` HOT 3
- A colon cannot be used in an unquoted mapping value HOT 1
- String interpolation ${} in PHP8.2 warning HOT 3
- issue with Model Keys and Indexes HOT 3
- Failed Installing on newest Laravel HOT 5
- Change generator methods visibility from "private" to "protected" HOT 2
- belongsToMany Foreign UUID not working. HOT 18
- Add in already on going project HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blueprint.