I made an add user feature, but if I add the same data there will be a problem, I want to limit the duplicate data, how to create a warning if the same data has been added? Source Code UserController Screenshot Error Image Answer There are two ways to do it. First is to add ‘unique’ to your validation. For
Tag: frameworks
Unable to retrieve data stored on Laravel session on subsequent requests
I am writing a programme that requires a multi-step form before all the validated data will be stored in the database. For instance, Users have to provide their personal information before proceeding to the next step, and I want the validated data to be stored as a session up till the user completed its registration before all the data will
Allow css in framework [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 6 months ago. Improve this question How can I allow CSS in a custom framework? I use a framework from this video link. But it does not allow the use of
Exception: Function yaml_parse() does not exist
Please has anyone encountered the same problem? I wanted to use the yaml_parse() function of PHP. Basically I wanted to create a big object/class(Parser) that will allow me to parse not only yaml but also json, … etc. So I knew that some of you suggest Symfony/Yaml, etc…, in short I find these libraries too heavy for me, especially the
cakephp 4.x query to get results from database
I came across a problem recently that I have to make a find(all) query in cakephp. Problem is I was unable to call model function to cakephp controller & add a command in function that would allow me to make a find(all) function in cakephp and retrieve all rows in a database that I was looking for. I would like
Manage route to subfolder of PHP framework that installed WordPress
How to skip web traffic into WordPress that installed on a subfolder like /wp I have a PHP framework at the root of my website. I use this framework: https://www.phpvibe.com/ I need to open WordPress in /wp (and all /wp/* traffic) How can I skip my website traffic by htaccess or PHP code? In my framework, I have a route.php
Trying to get property ‘name’ of non-object (View: (…) resources/views/products/index.blade.php)
In table in view with data from products table I am traying to show names from user table but getting this error. I made Laravel relations in models and foreign keys. And added directory in product controller for user model. Error: Trying to get property ‘name’ of non-object (View: /home/laravel/web/laravel.swt101.eu/public_html/abonamenty/resources/views/products/index.blade.php) This is part of my controller for showing product data:
printing all running session variable in laravel 5.1
How do I print all running session variable in Laravel 5.1? I want to print all the running session variable. Currently I can retrieve single running session for given value but don’t know the function for print all at one time with one function something like Answer If you just want to see contents of session, try dd(): If not,
Symfony framework install 406 Not Acceptable Error w/CPanel & WHM
So I am trying to get Symfony working on my server by following these install instructions. http://symfony.com/doc/current/book/installation.html#book-installation-permissions I got to the part where I ran this command in console in the directory where I wanted the framework to be installed. symfony new my_project_name I then followed these instructions to set my web root directory to /web as I believe I’m
Redirect route with two parameters in WITH [Laravel]
I have problem to pass two varialbles with “with” in Redirect::route… Here is my code… How to do this Here is error: Undefined variable: cartItems (View: C:xampphtdocslaravel-webshoplaravelappviewscart-success.blade.php) CONTROLLER View Answer You may try this: Or this: