Laravel 5.x Forms best practice - php

as described at the Laravel documentation, the official form builder is not supported anymore since Laravel 5.0. I need to build a multi page form in my Laravel project. What is the best practice how to do that? Because it's a new project, I don't think it's best practice to use the class from Laravel Collective.

Laravel doesn't come with all packages that are available in the world, doesn't mean you shouldn't freely use whatever package that you need and does the job.
So, unless you are ready to re-invent the wheel and re-implement the forms package then use the already existing and well tested package from Laravel Collective.

Related

Adding auth to existing project with Laravel Alpine and Livewire

I have an existing laravel project with AlpineJS. I wanted to integrate authentication but not able to find a proper solution having in mind I DONT USE VUE. I have done this with Vue but just wanted to know if there's an updated guide for Laravel with Alpine JS. I tried to look into documentation but wasnt able to find something related.
composer require laravel/ui
php artisan ui:auth
Do I still need to do this? Any suggestions for best practices?
Alpine is just a lightweight framework for DOM manipulation, it's not going to provide any authentication functionality alone so you will need to add something to your project.
If you're wanting to add authentication to your application, you'll want to consider something like Laravel Fortify which is a headless front end agnostic authentication solution. There are starter kits such as Breeze or Jetstream, however, adding either of these boilerplate start kits to existing projects can have issues. Some people recommend starting a new project, installing one of them and them porting your existing functionality across (this will obviously depend on the scale of your project).

Difference between laravel 5 and codeigniter 3

This may silly question. But I am going to start new project. I am quite confused which framework is best out of Codegniter 3 and Laravel 5.
What is the main difference between them.
Thanks in Advance
Right now, I personally prefer Laravel since it supports PHP7 unlike CodeIgniter (I still haven't read if CodeIgniter 3 supports PHP7). And based on personal experience, Laravel (through Eloquent) has "beautifully-written-codes".
Here are some references for you to check out: (I made sure to post both sides to not be bias)
https://www.codeclouds.com/blog/laravel-vs-codeigniter-a-difficult-choice/
https://www.clickittech.com/developer/laravel-vs-codeigniter-which-one-is-the-best-to-use
http://www.codeigniterhands.com/codeigniter-or-laravel
http://laravel.io/forum/07-08-2014-laravel-vs-codeigniter-a-difficult-choice
https://therightsw.com/codeigniter-vs-laravel-vs-yii-vs-cakephp/ (with grades for usability)
Each framework have their own features and capabilities, used during the development of application. Laravel is one of the highly used, open-source modern web application framework that designs customized web applications quickly and easily.Laravel is used not only for big project but also best to use for small project.
Best framework in 2018
If you want a framework with exceptional performance, with nearly no configuration, not using cmd and not interested with large scale libraries and also your project is in small scale it's better to use codeIgniter.
CodeIgniter3 vs Laravel5
Both framework are good in there place.
Laravel made from multiple open source project which make laravel more efficient , reliable and secure.
Where, laravel used blade engine.
It used composer for package manager.
It provide unit testing.
It provide more security.
It provide beautiful redis queue front portal called laravel horizon.
Disadvantage : laravel used predis which is slower, because it is written in php.where phpredis is more faster, but laravel 5.* Don't support it.
I will recommend you to use Laravel beacuse of:
Built in authentication
Awesome migrations
Artisan commands to do anything in your project
Built in pagination (It's took long in Codeigniter)
Eloquent (Very easy way to interact with your database)
Relationships
Routes
Easy API building
Easy debugging
Huge number of packages and libraries etc.

laravel 5.* - package driven development - best practices

this is not a code question about laravel 5.*, it's more like to know if you guys develop your applications using packages ("package driven development" ? Not sure if this is the right definition).
What I mean is: Instead of building an application and create controllers in app/Http/Controllers/, you wrap everything in a package and then 'require' that package using composer (like a wordpress plugin).
I'm trying to think in a way to isolate the core Laravel from my specific application and save time later when it's time to upgrade when a new Laravel version is available.
In my case I'm having some issues moving from version 5.2 to 5.3 because I have some customization in the registration and login process - It might be because I'm not using the right approach to write the code (patterns), so I'd like to hear from more experienced Laravel developers.
Thanks!
The great thing about Laravel, there's almost always a package for what you want to do. You can either create your packages as packages on composer, or you can install a module package and create them as modules.
For my projects I tend to use caffeinated/modules. I've tried a few and IMO it's the easiest to use.

Laravel 5.1 and 5.3 which is best for beginner

I am new to laravel and but know core PHP well. And I am decided to create a project in laravel. So I started studying laravel. while I research about laravel, laravel community says that laravel 5.1 has Long term support(LTS). Now I confused which version want to use. Give me suggestions about which one want to use.
#Gowtham I reccommend to go for 5.3 version. because of realy specious features like
Laravel Scout: is a driver based full-text search for Eloquent
Laravel Mailable :is a new Mail class for sending emails in an expressive way.
Laravel Notifications : awesome feature which allows you to make quick updates through services like Slack, SMS, or Email.
Laravel Passport : Another superb feature . It is an optional package that is a full oAuth 2 server ready to go.
There are lot more which will curious you to go for 5.3 version.

Install script using Laravel models, possible? [duplicate]

Is it possible to use Eloquent without Laravel or does somebody knows a equally easy to use ORM?
Yes you can. A while ago Dan Horrigan released a package called Capsule for Laravel 4 which allowed Eloquent to be used independently and with minimal setup. The package itself has been merged with the L4 core so you no longer need to use the package.
If you refer to the illuminate/database repository there is a nice little introduction on using Eloquent without the framework.
Here is a small excerpt of getting it up and running.
$capsule = new Illuminate\Database\Capsule($config);
$capsule->bootEloquent();
$capsule->connection()->table('users')->where('id', 1)->first();
Update
Dan Horrigan has since removed his Capsule implementation as it is now built directly into Eloquent. Refer to the above illuminate/database link for more details on how to use Capsule.
Check out https://github.com/Luracast/Laravel-Database it provides full eloquent support including artisan migrations and more for the latest Laravel 8.* components.
It uses capsule and lazy loads the components when they are used.
Disclosure: I'm the author of this repository
In Laravel 4.*, Eloquent is automatically independent because it's shipped with Dan Horrigan's Capsule. You don't need to download any extras. For a how to please visit: https://github.com/illuminate/database/blob/master/README.md

Categories