Why? I create cloud applications that look and feel like desktop applications. With a mixture of JavaScript with PHP.
I don't see why I would write desktop applications as most software will become internet based.
Even my development is happening in the cloud without a physical computer.
You'll be surprised how easy they can hack this password. Every application I make now has 2fa as default. And I believe you can add 2fa to WordPress as well.
Lately I tend to use action classes when there is quite a lot of logic involved.
In this case I make a changeTeamAction and all the logic happens in there. Some are small, some have quite a lot of private functions for all the checks and errors.
Most only have 2 public functions. Those are validate and execute/create/update or whatever fits best.
I have a difficulty understanding the question. But I'll give it a shot.
In phpMyAdmin you have a table posts. And a table post_category. And instead of having categories table. You want to place it in a configuration file.
I don't think it's possible to have a many to many relation this way. What is possible is a one to many. Then on your post_category you could have a post_id (int) and a category (string) .
This way you could place all categories in a array in a config file.
Tho by doing so you limit yourself to only showing the categories for a post. While it's more likely that you also want a relationship the other way around. (Show me all posts from a certain category)
Then it's much easier to place everything in the database and make a many to many relation.
In large models I only tend to place things like fillables, casts and documentation of that model. All other stuff is in traits, ex. ModelnameScopesTrait or modelnameRelationsTrait.
Tho reading a other comments here of placing related scopes and relations together seems very interesting as well. So I might organise it like that on my next project.
Isn't this easyer?
Groups::where(id, group_id)->with(users.friends)->get()
So your getting your group. Loading all the users and the friends.
Why? I create cloud applications that look and feel like desktop applications. With a mixture of JavaScript with PHP. I don't see why I would write desktop applications as most software will become internet based.
Even my development is happening in the cloud without a physical computer.
What about a view model class?
https://stitcher.io/blog/laravel-view-models
Only allowed 2 mails to be send in a short interval. It had me some time wondering how I got 2 mails but not the third of the mailing list.
experience. When I first started programming I knew shit. Now I know a lot more, in a few years I can handle anything.
you know what you want to learn or what knowledge you lack. Google and learn.
Google laravel tenancy . There you find a package that allows you to do what you want. Tho I must say, it's not beginners stuff.
How do you go to your Vue app? Trough a laravel route and then a blade where you load the app?
You'll be surprised how easy they can hack this password. Every application I make now has 2fa as default. And I believe you can add 2fa to WordPress as well.
I added a link to a post that explains it in more detail
Lately I tend to use action classes when there is quite a lot of logic involved.
In this case I make a changeTeamAction and all the logic happens in there. Some are small, some have quite a lot of private functions for all the checks and errors.
Most only have 2 public functions. Those are validate and execute/create/update or whatever fits best.
https://freek.dev/1371-refactoring-to-actions
Can you use controllers direct in forms? TIL . Thanks.
Posts.store
Phpstorm has a 30 day trial.
You can actually encrypt/decrpt an array.
Why not use laragon on windows?
Add a blade in a loop
I think you didn't add the Checking class to your controller. Check on top of your code that you have 'use App\Checking'
I have a difficulty understanding the question. But I'll give it a shot.
In phpMyAdmin you have a table posts. And a table post_category. And instead of having categories table. You want to place it in a configuration file.
I don't think it's possible to have a many to many relation this way. What is possible is a one to many. Then on your post_category you could have a post_id (int) and a category (string) . This way you could place all categories in a array in a config file.
Tho by doing so you limit yourself to only showing the categories for a post. While it's more likely that you also want a relationship the other way around. (Show me all posts from a certain category)
Then it's much easier to place everything in the database and make a many to many relation.
I tend to build with Vue /laravel . The only place i use type is in Vue to declare what I expect as a prop.
There are 7 major JavaScript types.
https://javascript.info/types
Your email prop is most likely a String. So you expect a String, not a email.
You could make a clean view and then use the browsers print page / save as PDF function.
Interesting but I'm afraid Groningen is a bit to far out of my way.
In large models I only tend to place things like fillables, casts and documentation of that model. All other stuff is in traits, ex. ModelnameScopesTrait or modelnameRelationsTrait.
Tho reading a other comments here of placing related scopes and relations together seems very interesting as well. So I might organise it like that on my next project.
Regular websites mostly use mailables and basic functions.
CMS system where laravel is mostly a backend for the vuejs front.
Multitenancy sites where we use full power with caching, mailables, routes, commands, multiauth, role systems and ...
That doesn't seem like much code. So you could put it in a controller. Or you could make a class to perform those functions.
Isn't it less complex to add a category id on your notes model?