Jump to content

Search the Community

Showing results for tags 'laravel'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 4 results

  1. What is Laravel? Laravel is one of the a free highly known , open-source PHP web framework , introduced by Taylor Otwell in 2011 as an effort to provide a more advanced alternative to the CodeIgniter framework, which did not provide features such as- built-in support for user authentication and authorization. Laravel attempt to take the pain out of development by enabling common tasks used in the mainstream of web projects, such as- authentication, routing, sessions, and caching and become The Best Framework for PHP Development. Without any type of sacrificing in application functionality, it makes a pleasing one for the developer. But it is not so easy to work on new technology, there must be some key points which needs to be keep in mind, while working on them. Few are the list of some biggest mistakes which is done by the developers during work Laravel framework, but you can avoid them. Below are the few helpful steps that can be followed in Laravel Development to gain more control over performance. 8 Biggest Laravel Development Mistakes- 1. During installation & setup 2. Application Key 3. Web server Configuration 4. Laravel Nova 5. Database Seeds 6. Remove Development Configuration 7. Backups 8. Migration Read the full article and you can easily avoid above mentioned mistakes- 1. During Installation & Setup : When you will execute composer install for Laravel 5.6 during installation it will work perfectly but when you want to add any other package or for some other reason if we need to run composer update command then it will not execute. In addition to a server, Composer will be required, which is a streamlined way of dealing with internal and external dependencies. Otherwise you will face the problem – laravel is not recognized as an internal or external command Solution : During Installation it is most important to know the basic system requirement and compatibility. Laravel installation can be done on most servers, the basic server requirements are: · PHP >= 7.1.3 · A local PHP environment (i.e.Valet, Homestead, Vagrant, MAMP, etc.). · A database (You can prefer MySQL also). v Valet- automatically sets up everything for local PHP environment on Mac and Homestead or any kind of a virtual machine setup for windows. (Selection is based on type of OS, you are using) v Laravel Homestead is an official, pre-packaged Vagrant box that provides a stable development environment. (No requirement of Webserver Installation or PHP on local machine . Two ways to installing Laravel framework on a Windows PC- via Composer or via homestead. Choose one of them. Here We Discussed On Installation Via Composer: Laravel used this PHP dependency manager to manage all its dependencies. To use Laravel without any Hassel, the Composer must be installed on your machine. Make sure your server meets all the mentioned requirements- ü PHP >= 7.1.3 ü PDO PHP Extension ü XML PHP Extension ü Tokenizer PHP Extension ü Ctype PHP Extension ü BCMath PHP Extension ü JSON PHP Extension ü Mbstring PHP Extension ü OpenSSL PHP Extension Once the above requirements become fulfilled , now need to download the Laravel installer using Composer through the command: composer global require laravel/installer After that create the fresh Laravel installation in the specified directory via laravel new command. e.g. Directory named buddy will be created via laravel new buddy command which is containing a fresh Laravel installation where all dependencies of Laravel are already installed. 2. Application Key: If the application key is not set, your user sessions and other encrypted data will not be secure. Solution: The next thing you should do after installing Laravel is set your application key to a random string. If you installed Laravel via Composer or the Laravel installer, this key has already been set for you by the php artisan key:generate command. Typically, this string should be 32 characters long. The key can be set in the .env environment file. If you have not renamed the .env.example file to .env, you should do that now. 3. Web Server Configuration If the .htaccess file that ships with Laravel does not work with your Apache installation, it sounds that Web server configuration is required. Solution: Laravel includes a public/.htaccess file that is used to provide URLs without the index.php front controller in the path. Before serving Laravel with Apache, be sure to enable the mod_rewrite module so the .htaccess file will be honored by the server. If the .htaccess file that ships with Laravel does not work with your Apache installation, you should try alternative: Options + FollowSymLinks -Indexes RewriteEngine On RewriteCond %{HTTP:Authorization} . RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] Note: If you are using Nginx, the following directive in your site configuration will direct all requests to the index.php front controller: location / { try_files $uri $uri/ /index.php?$query_string; } When using Homestead or Valet, pretty URLs will be automatically configured. 4. Laravel Nova: Your requirements could not be resolved to an installable set of packages. The requested package laravel/nova could not be found in any version, there may be a typo in the package name. Solution: Add following options at the end of your composer.json-File "minimum-stability": "dev", "prefer-stable": true, and run composer update. 5. Database seeds To make staging environment work conveniently, you might take care of so-called “database seeds” – the main data which comes as the first filling the database for the project launch. There will be a chance of something going wrong after when you will move to live server (also called “production”). Solution: Here are some important points to solve the issue – v Staging server must be as much similar as live server. Same operating system, web-server configuration etc. Then we can minimize the chance of something going wrong after we move to live server (also called “production”). v Quite an often mistake is for developers to test locally with Windows operating system and Apache web-server (or something like XAMPP), whereas staging/production servers are Linux-based with Nginx server. v Another important note is that the client needs to be heavily involved in this testing. By this point you should be performing not only technical testing, but also business logic – something might be missing or overlooked. 6. Remove Development Configuration Sometimes a developer might be rushed and forget to remove development variables and configurations, then upload these by accident to the production environment. This can be a disaster for a live application. Solution: It’s important for any developer to have a staging environment that mimics the production environment, which houses the live code. Many new developers try to skip the staging environment and go straight from development to production to save time. This is a mistake because staging can help you identify problems that you didn’t catch in development (remember, staging mimics production). If you accidentally forget to remove configurations or don’t find bugs until staging, you can still catch them before they hit the production environment. 7. Don’t forget to run backups Sometimes many developers have poor backup practices, and don’t take back up their data, and in last they again do significant work on project. Solution: Sometimes many developers have poor backup practices. Don’t need to back up every hour, but backups should be run each day if you do significant work on a project. Always remember that backups save you hours of recoding, should you lose your data in the event your drive fails . If you have a hard time figuring out a problem in your code, back up the system so you will not lose the solution—and hours of work—and must recode it. A backup can also save you from missing a deadline if something happens to go twisted. You should also create backups for your clients in the rare case that a client has a critical failure and no backup. It’s a nice gesture, and you can help your client out of a potentially sticky situation. 8. Migration : To save time in short-term, most of the Laravel developers don't use migration features. This is not the correct way to manually create new database tables and directly add new fields in to the database tables. Solution: They should use database migration to add or alter anything in the database. Migration is a well-ordered way of specifying table structure without bothering writing a bunch of SQL queries. Even more, migrations work a little like Git as it allows you to make incremental changes, roll back changes, and keep the database structure in sync when multiple teams are working on the same application. It keep all record of how database created and altered over the time, and migrations and seeders make it easier to re-deploy the application, or distribute it to other people.
  2. Greetings to all the users and administrators of w3scools invisionzone forum. I would love to get some constructive criticism on this web development tutorial site namely webtrickshome. It's been around for slightly more than a year but I redesigned it recently. Any feedback regarding the design and contents would be highly appreciated. Thankyou
  3. I dowloaded the following project from github: https://github.com/deadwheel/FoodDelivery I did the following steps: 1- Downloaded the files via git bash to my xamppp'shtdocs folder: $ git clone https://github.com/deadwheel/FoodDelivery.git 2- Created the database forge on phpmyadmin. 3- I modified the config/database.php on the project's folder leaving it like this: 'mysql' => [ 'driver' => 'mysql', 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '3306'), 'database' => env('DB_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'root'), 'password' => env('DB_PASSWORD', ''), 'unix_socket' => env('DB_SOCKET', ''), 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', 'strict' => false, 'engine' => 'innoDB', ], 4- Input the following commands: $ composer update $ php artisan migrate With this, all the tables apperead on the database, but i got the following errors. Connection.php line 664: SQLSTATE[HY000]: General error: 1825 Failed to add the foreign key constraint on table 'order_driver'. Incorrect options in FOREIGN KEY constraint 'forge/order_driver_deliverer_id_foreign' (SQL: alter table `order_driver` add constraint `order_driver_deliverer_id_foreign` foreign key (`deliverer_id`) references `users` (`id`) on delete NO ACTION) PDOStatement.php line 143: SQLSTATE[HY000]: General error: 1825 Failed to add the foreign key constraint on table 'order_driver'. Incorrect options in FOREIGN KEY constraint 'forge/order_driver_deliverer_id_foreign' PDOStatement.php line 141: SQLSTATE[HY000]: General error: 1825 Failed to add the foreign key constraint on table 'order_driver'. Incorrect options in FOREIGN KEY constraint 'forge/order_driver_deliverer_id_foreign' I ignored the errors and tried opening the project on my browser going to: https://laravel.test/FoodDelivery/public/ and i got the following error: "Whoops, looks like something went wrong." Is something missing? what else do i need to fix?
  4. It may be the worst question in the forum, but I really need to ask.If WordPress can do so much so easily, why do we need to learn PHP frameworks, such as Laravel, that seem so hard. What can be built with these frameworks that is in demand.Please don't be annoyed with the naivety of the question. I would really appreciate some insights regarding this matter.
×
×
  • Create New...