masoniteframework / docs Goto Github PK
View Code? Open in Web Editor NEWDocumentation for Masonite
Home Page: http://docs.masoniteproject.com
Documentation for Masonite
Home Page: http://docs.masoniteproject.com
Any example for API with Authorization? Mostly example is too old to run.
No response
Can Add example with api or vue example for newest release?
No response
No response
matches
is only listed in the validation rules but there is no explanation about it !
https://docs.masoniteproject.com/advanced/validation#available-rules
I would like to remove git book tags from README.md such as( {% code-tabs %} {% code-tabs-item title="terminal" %} ) because they don't render in markdown.
Adds docs to the ORM section about how model events and observers work
in docs, we should probably demonstrate what the elif block should look like with a condition…
perhaps an easy first PR for someone
https://docs.masoniteproject.com/the-basics/views#if-statement
related: i find it a confusing message to show both jinja2 syntax and “@” syntax for templates
I think we should stick to one and promote it alone
related: i think it’s strange that the trailing : is optional and seldom demonstrated in docs. almost like it shouldn’t be demonstrated at all or it should be enforced by the parser.
e.g
@if expression:
# is the same as
@if expression
https://docs.masoniteproject.com/the-basics/views#if-statement
I was reading Masonite source code and just found something not mention in the doc.
It is possible to name the routes created by Resource route.
We need to add a dic names parameters in this format {'action':'route name'}
Here are the syntax:
Resource('contacts', 'ContactsController', names={'index': 'contacts.index'})
We can do that for all the 7 actions
Resource('contacts', 'ContactsController', names={
'index': 'contacts.index',
'show': 'contacts.show',
'create': 'contacts.create'
'store': 'contacts.store',
'edit': 'contacts.edit',
'update': 'contacts.update',
'destroy': 'contacts.destroy'
}),
ORM docs for inserting related records
The What's New document links back to itself for the "Upgrade Guide" and the Masonite 2.3 to 3.0 upgrade guide links back to itself for "What's New". These links should be swapped.
In contributing guide.
ORM docs for .morphs('record')
to schema builder
Masonite 4.0 docs does not have an entry on its approach to Environment, which 3.0 has. Might be good to highlight this to promote DRY, reduce boilerplate code, and be consistent with Masonite approach.
DRIVERS = {
'disk': {
# 'location': 'storage/uploads'
'location': {
'uploads': 'uploads',
'static': 'static'
}
},
and use it like
static('disk.static', 'css/style.css')
Currently the compiling assets link in the side nav is way down near the bottom. I would have expected it to come right after the static files link at the top in the basics section.
Or alternatively link from the static files page to compiling assets page some way. Just so there is a flow from one to the other as they are very related.
Docs say notifications
, but it's a singular notification
key in the fake and restore methods that should be used.
I was told there is not a lot of information in the broadcasting docs. Will need to review this
validate.file('doc') # check if valid file
validate.file('doc', 1024) # check valid file and max size is 1 Kilobyte (1024 bytes)
validate.file('doc', '1K') # check valid file and max size 1 Kilobyte (1024 bytes)
validate.file('doc', '1k') # check valid file and max size 1 Kilobyte (1024 bytes)
validate.file('doc', '1KB') # check valid file and max size 1 Kilobyte (1024 bytes)
validate.file('doc', '15M') # check valid file and max size 15 Megabytes
validate.file('doc', mimes=['jpg', 'png', 'gif', 'tiff']) # check valid file and of one of those types
validate.image('doc') # check valid image
validate.video('doc') # check valid video
validate.image('doc', size="2MB") # check valid image and size !
optional params
https://docs.masoniteproject.com/v/v3.0/the-basics/routing#optional-route-parameters
exclude_middleware
Maybe we can have 1 section in the response docs for these 3 methods? with_success, with_errors, with_input?
From Slack:
Allan Cochrane 6:38 PM
I'm trying to test the response from a JSON endpoint served by masonite-api, how can I dump the JSON in my test?
Joseph Mancuso 6:40 PM
Use the .container.make(‘Response’)
After your json call inside your test
That will get it as a string
Add documentation for new validation rules from PR validation/#44.
I added a warning few weeks ago to explain that when using SoftDeletesScope on a model, you should still define a column "deleted_at" on your model (it's not automatically done). I can't find this warning anymore ? has been removed ?
I would like to add it again, and give an example. We should use datetime field and not timestamp (some people might be mistaken, I made the error myself 🙄 and the list of users was always empty as all users are then created with a deleted_at
field not null).
Example of setting the column related to the SoftDeletesScope on the User model:
# user migration
table.datetime("deleted_at").nullable()
Currently, How-To guides section has links to external sources.
It has deployment documents for
Now there is deployment documentation that would work with any VPS like DigitalOcean and/or Vultr
It would make sense to create deployment section in the docs and make these three docs part of official documentation. It will help keep them up to date as well.
Midway down the Masonite 2.3 to 3.0 upgrade page it says:
"If the changes in green already exist then your project is correct. If you have the code in red then make this diff change:" My browser doesn't display green or red; only strike-through text and (dotted) underlined.
I suspect CSS styles are missing on the documentation site.
Hello, I have a need to create timed tasks and dynamically execute them in the framework of Masonite. How to solve these problems? Thank you!
Detailed in this PR https://github.com/MasoniteFramework/masonite/pull/553/files
Describe the bug
Masonite ORM supports specifying restrict
when defining foreign key relationships, however the option is not mentioned in the docs - only cascade
and set null
are shown.
For example, this works fine:
table.foreign('creator_id', name='fk_scenarios_creator_id'). \
references('id').on('users').on_update('cascade').on_delete('restrict')
https://orm.masoniteproject.com/schema-and-migrations#foreign-keys
Would be good to have it added.
Pagination docs for ORM
Some parts of the documentation for task-scheduler have the import path from scheduler.Task import Task
while the ones created by the craft command have the import path from masnoite.scheduler.Task import Task
.
These pages contain the same content: https://docs.masoniteproject.com/ and https://docs.masoniteproject.com/prologue/introduction-and-installaton
Added optional query logging in configuration settings for ORM
Reading the docs of Orm part in Masonite docs I'm a bit confused when the way of uses Model came first than Schema and Migrations ( necessary for creating the tables for uses of Models )
Should'nt they came first than QueryBuilder section?
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.