Laravel-5 Questions
Ad
Laravel validateForm: prevent update when inactive
I'm trying to prevent an update in a record when the function isactive returns false. foo.php //
Refactor Laravel Eloquent Query
I want to filter data given from eloquent laravel. i have 4 date picker in my view, and i want when each of one has filled and has date the query
how to prepare api using laravel and vue.js
Good day; i am new in vue.js and i want to build api in my project using vue.js and laravel i have some question and
laravel 5 Search related models
I have two related model. class girl extends model { public function target() { //return
laravel api validation custom message
I am trying to write a custom message for a validation in laravel. i have checked online and i saw some post where others solve that same issue by
Why laravel auditing not functioning?
I have done my coding but the laravel audit seems not catch the data for update. the data i try to update is on the column of value, but on the
Cannot get children category product in Laravel
I want to get child category products when i click on any link of a parent category, right now my relation is working properly for single
Create dynamic routes in Laravel
I'm working on ecommerce website, stuck in nav bar, i have created routes something like this: route::get('/category/{slug}',
Laravel 5.3: no cookies are set on browser, getting TokenMismatchException
I have a laravel 5.3 app on ubuntu 18.04. whenever i submit a form i get the following error tokenmismatchexception in
i have this error when i want tu use model binding in laravel 5.8
Routeserviceprovider public function boot(router $router) { parent::boot($router);
Ad
How can I send data to this Laravel form via AJAX?
I am making a laravel 8 app with posts and post categories. i am now working on the edit post form, and i need to
How to hide website information on Wappalyzer
I have a website written in laravel 5.8 and when i search my website info on wappalyzer.com website, i can see all the entire
Laravel - Disable SSL in local environment
I have implemented ssl in dev, test and prod environments. i had to change some blade function to secure_asset() and
Page is not working in cpanel using Laravel 5.6
I created the laravel project in a local machine and i created the database also. in the local machine, a project is working without any issues
Fail to load an image from storage on laravel
Can you please give me an example: i used seeder to create an image for the user, but i couldn't load it, even though i ran php artisan
How do I pass apikey and other keys to header in guzzle 6.3?
I have a simple registration form that the user can register in my app, now i want to send submitted data to another service. first i test
Laravel 5.4 with custom login failed to redirect
I am facing problem with the login with laravel 5.4 where after successful login user will still redirect to login page. i have referred to
How can you properly create a form which has options to fill for text fields and an option to upload an image? PHP/Laravel
I have created a form which has fillable input fields but there is an option to upload an image to. the form example: {!!
AdminLTE themes: small disagreement with coworker (soft skills)
I have a quick question regarding implementation of a small change in our system, and i want to hear your opinion about my little disagreement
Is it risky to choose most recent versions of Laravel over LTS versions?
I am planning to create a web project by using the laravel framework. i have worked on laravel 5.1(lts) and later haven't learned further versions
Query data laravel
I want to know how get this working in laravel: i have two tables: "orders" and "delivery_boys". when an order is created i want
Ad
Laravel Chunk Upload skipping one chunk
I am using laravel-chuck-upload in combination with
why my database does not update ? (LARAVEL)
My database does not update while when i do dd(request()->has('validated')); this is what my web.php looks
Is It Possible to Partially Escape the output string using {{ .. }} and {!! .. !!} in Laravel
I am using laravel 5.7. route is not working inside unescaped {!! .. !!}. look at the href='{{url('/')}}'
laravel cant send users name in related products
I use this code but i cant send users name in related products i use this code creator: {{$product->users->name ?? ''}}
Why is my show function not working in Laravel 5.8
Below is the code in my route route::get('patients/{$patient}/','[email protected]'); the above will not
Laravel Spatie Activity Log Ip Address Customize
I am using laravel spatie activity log package in my laravel application. i could customize in each module. public function
Laravel concatenate src link with variables values
I need to dynamically complete google maps static url with values from 2 variables. the basic url is: <img
Can't install Spatie Activity-log Package in Laravel 5.8
I was going to install spatie-activitylog package in my laravel application. composer require spatie/laravel-activitylog
SQLSTATE[42S22] error in Laravel 6 update function
I'm trying to run a update function in my laravel app but every time when i run the function it gives me this error,
Laravel Spatie Get All Permissions with Eager Loading
Everybody! i am using laravel spatie permission package. and i can get user's all assigned permissions like this.
Why PHP Artisan Tinker kept showing null?
┌──[[email protected]]──[/home/jdoe/jdoe] └── cat .env | grep app_url app_url=https://www.jdoe.com
Ad
how to create search in laravel 5.8
I want to create search by title of the posts "slug" , and when it searched for posts i want to show me the results in a list. i have already
Laravel Pagination Links not showing?
I used correct code but i don't know why links are not showing on view. i tried many solutions also but didn't work any.can anyone help me to get
How do i count a specific column on the dashboard in Laravel?
Below is how i view count of on my dashboard for all devices i store, where 'devices' are all devices am storing in my database. l want to view a
Dynamic seeding in laravel 5.4
I'm extremely new to laravel and having trouble with this seeder. i feel like it should be an easy thing to do, i just don't have the right tools
Laravel 5.8 Too few arguments error for jobs
I'm getting error below in the failed jobs table. too few arguments to function app\jobs\updateteamtodoprogress::handle(), 0 passed
force encoding to work on request made for laravel api by web browser
I am maintaning an api that have some requests made by a front-end app. when i call it from
Laravel Bootstrap 4 Modal - Show modal on click event with AJAX call data
I have a modal which is call in a click event with the following code: $('.openbtn').on('click',function(){ $.ajaxsetup({
can't add user photo with vuejs
I have built a profile components to my projects (laravel+vuejs) when i try to show the user photo in her place it didn't show i try many ways
Eloquent whereHas Relationship with constraint on particular related Entity
Consider having two models user, and book the last one has a status column that can obtain different string
Laravel Ajax - Uncaught ReferenceError: KWS1389776 is not defined at HTMLButtonElement.onclick
I have an ajax call to fetch a record in model and display values in a modal that must popup after get request is done. the javascript
Password confirmation doesnot match?
I am trying to using confirm password validation. i applied correct rules. but when it validates then it give me validation error like below: the
Ad
How to Redirect using two parameter in Controller using Laravel 5.5
Controller is : elseif ($profile_is_exsit > '0') { $url =
Laravel: Redirecting from javascript in a Blade file` without using a route name
I am using a blade file and need to redirect from javascript but i won't be redirecting to a path inside my app -- i will be directing to another
How to display rating stars Laravel and Ajax
I have created a review system which allows a user to add a review in a product and display the rating stars. so if a user rate a product with 4
Foreach in Controller returns Only one Output Laravel and Ajax
I'm trying to display names from the database using ajax and i use foreach loop in the controller but it only returns one name instead of two(it
Laravel: Create HasMany Relationship Based On Condition
I need to display reproductions based on gender condition reproduction table: $table->bigincrements('id');
Laravel MonoLog, pushProcessor not Logging Addition attributes
I want to be able to add a unique id (uid) to my logging. in example 1: which is depended on
Laravel BelongsTo returning empty object
I have a table called messages and users. the users is the default users table generated by laravel auth. for some reason in my postmessage
Laravel: How to Filter In Custom GetAttribute Before Collection
I am able to filter the custom get attribute field after retrieving it to the collection. i now need to filter before
Update project from Laravel 5.8 to 6 or 7
I am beginner in laravel. i make my project in laravel 5.8. now i want update it. i have this composer.json: { "name":
Order a array by date in Laravel
I want to order an array with customer comments by the field date. from the most current date to the oldest.
Laravel Spatie Permission Multi Models to Permission
I know how to assign permissions to user. class user extends authenticatable { use hasroles; }
Ad
Mysql Query Or Laravel Eloquent for Average of multiple column
Here two tables. table1:customer +----+-------+-------------+--------+ | id | ip_id | customer_id | class |
ErrorException Undefined variable: posts
I want to get some field data in database in several different tables and i have made relationship between tables in post model , and in
I want to convert simple join SQL Query according to Laravel Structure
I want to convert simple join sql query according to laravel structure. please find my sql query below select count(s.id) as
PHP / PHP Unit / Artisan / Laravel restart app on next available port
I have an integration test suit built using php unit running against a laravel app. when the tests failed the app doesn't shutdown. when i run the
Laravel 5.3 log query result?
I'm trying to find out which sql queries are slow in a legacy application of my company, so i'm logging the queries as described at
Laravel URL to file in storage does not work in browser
I have this filesystem config for my folder: 'apks' => [ 'driver' => 'local', 'root' =>
Multi table Mysql joint query in Laravel
Am trying to connect two tables customer and customer_usage for getting the result.tables are showing below. table: customer
Laravel Telescope - 403 Forbidden
I have implemented laravel telescope and i can only acces if app_env=local i have followed laravel's documentation and i
Laravel Showing all users and check if belong to Bans table
Hi im working on admin dashboard and i want to show all users and check if the user blocked get information about the ban from bans table im
Laravel - Undefined index in query builder
I have the following array which i want to pass all values for "main_id" key to wherenotin condition: array:7 [
Laravel Delete Model only works in local environment
I'm having a strange behaviour with deleting model records. i have a table where i select records and i pass the id's to a route for deleting
Ad
Getting General error : '"mysqldump"' is not recognized as an internal or external command in laravel
Getting general error : '"mysqldump"' is not recognized as an internal or external command in laravel while run the following command.
laravel BelongsToMany pagination
I have 2 model 1 - category with parent and child class category extends model { protected $primarykey = 'id'; public
Laravel Email Verification Disable & Enable with one touch
Is there anyway we can enable / disable email verification dynamically when a users register? i think, in order to set email verification,
Laravel cron not shooting on the given time
Hello laravel cronjob is not shooting with the time give in following code
Laravel Post Request empty Request parameters
When i post to my api endpoint with postman or my application the request parameter is an empty array. with other controllers
Sum of columns with item and item type grouping
I have table with seller_id, transaction_type, sub_total, total_commission_fee, refund_fee, cancellation_fee
Collection could not be converted to int Laravel
I want a user to review(rate) a product only once, i saw
How to execute two where conditions in laravel where order_id is same but product_ids are in array
So i have a table ordered_products ordered_products table
How to filt data by time using Laravel?
I have this query, i would like to obtain only the data created on the current month public function index(request $request) {
How to set language when generating pdf in Laravel
Is there a way to force the language when generating a pdf in laravel? i'm using the package barryvdh/laravel-dompdf and
Multiple Layouts in Laravel Blade, Vue-Router
I am trying to separate user & admin functionality but can't find a satisfactory solution. after login, the user is authenticated and
Ad
Laravel groupBy groupBy need to show only last value
I have one table who has this values: unidade_id, bloco_id, image_name and version. to shrink my index view, i'm trying to show
Laravel Unique Depends on Other Column
I have a table school_name and in form i want to apply 2 conditions if school name exist than branch must be unique i tried below
How to filter a record depending of the user connected using Laravel?
I have the next table..
Laravel repository pattern - error with relations
I am beginner in laravel and php. i have in my project laravel 5.8 i make repositories paternities in my project. i write repository base,
Laravel unable to test job with mocked Service and object. The Mockery spy fails to detect called method
I want to test my functionality of my job: namespace app\jobs; use illuminate\bus\queueable; use
SQLSTATE[HY000] [2002] Connection refused for Laravel site
I get this error when i try to host my laravel project at 000webhost:
Validate .tar file upload in Laravel 5.8
I have this code $inputs = input::all(); $file = input::file('file'); $validator = validator::make($request->all(), [
How do I access file mimeType in Laravel 5.8?
I had this $file = array('file' => input::file('file')); and dd($file); return
How to pass parameter to a laravel elequent model's event observer
I have a model in laravel and i want to do something after the first time which an object of my model is created. the simplest way is to add a
Laravel app.js and bootstrap.js are not included?
I installed a fresh laravel 5.8 and included the <script src="{{asset('js/app.js')}}"></script> at
Laravel not return the first return
When i extends apibasecontroller in another class, response token denied is doesn't work. even though i put wrong app-token but still give
Ad
How to reduce load time Retrieving large database table with 12,000+ rows in laravel
Hi there, i have a 'subscribers' table in my db, having more than 12,000 rows and the number is increasing
laravel 5 smtp mail not sending even after changing less secure app
I have already changed gmail less secure app on (at gmail setting) and my .env as following
Laravel route not defined error when it is clearly defined
I am trying to handle a basic form with laravel and am running in to an issue where my post route isn't being detected and is resulting in a route
Is there any way to bypass using database in Laravel
I'm using laravel version 7.x where having trouble to access a property value inside my view template. it's showing the
Non-static method App\User::addresses() should not be called statically
I'm trying to get all the addresses of a user who is logged in for that i have created a relation in model address and user. any customer/user who
How to create .json file and write into that file with data using PHP/Laravel
I have form for image upload. after uploading the image with title i store the image in a directory. instead storing the image
How to set validation as optional in Laravel
I want to make roles to be available only for admin can select roles for users and while user wants to edit the profile information can only see
How can i fix logical error that is session is not working?
I want that my application will go to admin_panel.blade.php only if the user login. i don't want to go there directly. so i implemented middleware
Laravel Stop Registration from admin panel
I building settings page where the admin can change some setting in the website i want to add an option to stop registration for
Laravel 5 & Vue components – Remove Public from URL
I have a laravel 5 project with vue components. the project works fine. but i removed the "/public" from the path using this
Laravel Empty Password hashing
When i trying to update user data and let the password field empty it hashed again that means the password will change and you can't log in again
Ad
How to send a query in a variable using laravel?
I have this function to register my users protected function validator(array $data) { return validator::make($data, [
Fetch image as a url from mysql database in laravel Api
I want to fetch the image from database as a url like
Ad
Blog Categories
Ad