[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More



Laravel is a free, open-source PHP web application framework for the development of web applications following the model–view–controller (MVC) architectural pattern. Some of the features of Laravel are a modular packaging system with a dedicated dependency manager, different ways for accessing relational databases, utilities that aid in application deployment and maintenance, and its orientation toward syntactic sugar. Laravel is regarded as one of the most popular PHP frameworks.

Share tech news, updates, or what's on your mind.

Sign up to Post

I am using laravel eloquent to retrieve values from mysql database. The example return value below is below is retrieved from my browser:


Open in new window

I notice that the attribute unit_price has a double quote where else the attribute id and total_price on the other hand has no double quote.

In your opinion is this acceptable? What could be the root cause of the result?

Please note that the attribute total price, its value is the result of multiplying two values. Example:

$cart['total_price'] = $variant->list_price * $cart['quantity'];

Open in new window

Your help is kindly appreciated.
C++ 11 Fundamentals
LVL 12
C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

The following is coded in Laravel framework:


$shipping = DB::table('shipping')->where('country',$delivery->country)->first();
$data= json_decode(json_encode($shipping),true);

Open in new window


array (
  'id' => 3,
  'carrier' => 'EN',
  'country' => 'AU',
  'rates_json' => '{"rates": [{"international": [{"zone4": [{"to_kg": "2", "total": "1", "from_kg": "1"}, {"to_kg": "4", "total": "2", "from_kg": "3"}]}]}]}',

Open in new window

In MySQL database i stored rates_json in a json datatype column. The attribute from_kg and to_kg is a range.  

I intend to retrieve the total if a value is between the range. For instance, if value 1.5 is between  1 and 2 then the total is 1.

Your help is appreciated.

Thank You.

I'm currently creating an application that is used for planning certain projects.

I'm running Laravel 5.7, with AdminLTE.

Currently I'm implementing the functionality to create projects and the basic CRUD functions that come along with them. Everything is working, but there's one small detail.

We assign hours per week to a project, but a project can last longer than one week, of course.


What users do is they insert a start week, for example week 40 and an end week, for example week 45.

What I want to do is the following: Have a button / link below the weeks that says "Assign hours".

When that button / link is clicked, there should be a number of inputs that pop up, corresponding to the number of weeks.

For example: Start week = 40, end week = 43, I should get 4 inputs.


However, I have no clue how to do this since I am not familiar with JavaScript or jQuery.

The second issue is: how would I store this in a database?

I was thinking about creating a seperate table named 'project_hours' or something like that which contains the week number, project number, user id and the assigned hours for that week. How would I loop through the set of inputs thats always a different number to store them in my db?

Any help is appreciated.

I have this create view:


@section('title', 'AdminLTE')


	<div class="box 

Open in new window

How to generate CSV file and send an email as an attachment of that csv file in laravel?
We´re providing online exam for ours members. The exam can be done in computer, tablet or smartphone. The exam have from 5 to 10 questions with 5 true or false afirmatives in each question. The exam have especific date, time and duration (20 minutes),  occurs quartely in all country, on centers with supervisors. The System use PHP language with laravel and Mysql. My question is if there´s any way to know if anyone during the exam copy the screen with the question and answer ? (like print scr button, or press three fingers on android screen)

I have so for been updating the data. Now when some lecturer writes say, completed in the comments section and checks completed radio button. Now next time when the same teacher checks it then it must show that the sub/chap has been completed. So how to do that in angularjs and php? Any help would be appreciated. Please do help me i am stuck.
How do I separate this "tue-09:00 AM-10:00 AM" in the format Start Time: 9:00 AM End Time: 10.00AM using angularjs?
I have table in which the day and time is getting stored in this ("tue-09:00 AM-10:00 AM" ) format, when I have to view the data I want it to be in the above format.
How can it be done?
I'm a few months away from starting to take on Freelancing gigs.

I was wondering how to do my books/bill clients.

I had a fantasy about using Laravel to create a separate site on a subdomain that would bill clients and export a CSV. But I've been thinking about using Freshbooks.

I will probably offer subscription services (hosting/maintenance) which I want to bill using the web.

My website will be WordPress.

I'm not sure how to handle billing, and I want to have a good system down when I start. I know that Freshbooks has an API.

What would be the best way to handle this?
one thing I want you to share your thoughts on how we can go ahead with the rebuilding of a website. What are the things according to you should be implemented on the website?
we would like to rebuilding of this site using  Angular 4 and Laravel 5
I have written a function to insert data into database. I want to know how to update the row data when inserting again?
public function detailsInsertion(Request $request) {

$link = \App\Models\Gallery::where(['id'=>$this->getSelectedSchoolId()])->first();

  if ($request->hasFile('file')) {
      $file = $request->file('file');
      $file->move('images/'.$this->getSelectedSchoolId().'/websitehome', $link->id.'.'.$file->getClientOriginalExtension());
        $link =  \App\Models\Gallery::create(['id'=>$this->getSelectedSchoolId(),'source_url'=>'images/image-not-found.png']+$request->all());
        if(count($request->social_media)!=0 && count($request->social_url)!=0)
          $social_media = $request->social_media;
          $social_url = $request->social_url;
          foreach (array_combine($social_media,$social_url) as $media=>$link) {
            $insert_social_link = \App\Models\Gallery::create(['section_type'=>'social_media','name'=>$media,'description'=>$media,'source_url'=>$link]);
        if ($request->hasFile('file')) {
            $file = $request->file('file');

Open in new window

CompTIA Cloud+
LVL 12
CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.


My manager asked me updating a website from codeigniter to  
backend: API using PHP (Symfony) or node (expressjs) or Drupal 8 . or any other framework. can you give me explanations?

And for single page applications Angular 4 or Vue js
I have two separate application built mainly using angularjs and  laravel.

1) Front office
2) Back office

The authentication method is Laravel passport.

The problem I am encountering is when I login to both front and back office. Then when I logout from either the front or back office app both application get logout.

This is happening when I'm using  the same browser with multiple tabs.

Are there implementable solutions to the mentioned problem.

Your help is kindly appreciate.
I have successfully implemented PayPal payment gateway integration into my Laravel e-commerce web application.  However I am still trying to find out if suppose the following scenario happens then how does the recovery take place.

1) The E-commerce app sends details to PayPal
2) The E-Commerce app +/ hosting encounters a problem
3) PayPal send a response to the E-commerce app
     * next course of action is for the E-commerce app to process the response and update the order status. (i.e. Pending to Paid)

However since the app +/ hosting is down then how do we identify which order encountered a problem at that point of time and recover the order status. Is there a PayPal api that help to achieve this?

Your help is kindly appreciated.

Thank You.
How to get attendance per day of a student in jquery? I have combo box where there are 2 options "full day", "subject wise". On click of subject wise entire teacher data, date time is shown but if its full day then how to write in jquery to get student attendance for the entire day?
Hi Experts

Could you point what is needed in terms of Apache2.x  configurations to runs Laravel apps ?

The examples I had run uses Laravel's internal server

Open in new window

And I want to run from Apache.

Thanks in advance!
Hi Experts

Could you point how to correctly configure PHP to use with Laravel?

After a composer update this error occurs
- laravel/framework v5.2.9 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.

To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php/7.2/cli/php.ini
    - /etc/php/7.2/cli/conf.d/10-mysqlnd.ini
    - /etc/php/7.2/cli/conf.d/10-opcache.ini
    - /etc/php/7.2/cli/conf.d/10-pdo.ini
    - /etc/php/7.2/cli/conf.d/20-calendar.ini
    - /etc/php/7.2/cli/conf.d/20-ctype.ini
    - /etc/php/7.2/cli/conf.d/20-exif.ini
    - /etc/php/7.2/cli/conf.d/20-fileinfo.ini
    - /etc/php/7.2/cli/conf.d/20-ftp.ini
    - /etc/php/7.2/cli/conf.d/20-gettext.ini
    - /etc/php/7.2/cli/conf.d/20-iconv.ini
    - /etc/php/7.2/cli/conf.d/20-json.ini
    - /etc/php/7.2/cli/conf.d/20-mysqli.ini
    - /etc/php/7.2/cli/conf.d/20-pdo_mysql.ini
    - /etc/php/7.2/cli/conf.d/20-pdo_sqlite.ini
    - /etc/php/7.2/cli/conf.d/20-phar.ini
    - /etc/php/7.2/cli/conf.d/20-posix.ini
    - /etc/php/7.2/cli/conf.d/20-readline.ini
    - /etc/php/7.2/cli/conf.d/20-shmop.ini
    - /etc/php/7.2/cli/conf.d/20-sockets.ini
    - /etc/php/7.2/cli/conf.d/20-sqlite3.ini
    - /etc/php/7.2/cli/conf.d/20-sysvmsg.ini
    - /etc/php/7.2/cli/conf.d/20-sysvsem.ini
    - /etc/php/7.2/cli/conf.d/20-sysvshm.ini
    - /etc/php/7.2/cli/conf.d/20-tokenizer.ini
  You can also run `php --ini` inside terminal to see which files are used by 

Open in new window

I've been asked to submit a code sample using JQuery and Laravel. It's done and I'm getting ready to zip things up to hand to the administrator but I've got a question.

When I go to zip up the entire Laravel project, the "vendor" and the "node_modules" folders are enormous.

The exercise itself is pretty simple. I think I could get the point across with a couple of blades and the controller. Still, I want them to see the entire site, so here's my question:

Do those who work in Laravel typically expect those two directories? Is there a more streamlined approach to sharing the code to a Laravel site or do you have to box up the whole thing?

Basic question, I know, but it's worth asking if there's a more expeditious way to do things.
Why Laravel is best PHP framework for web development  

As per Google Trends, Stack Overflow Trends, and stars on GitHub, Laravel is not only the most popular PHP framework, it also beats the competition by a substantial margin. The trend has been found in most of the world with India, The US, and China taking the lead.

Read more:  https://goo.gl/LoFKuo
using laravel 5.6 only( latest version)Creating a webpage with a form that has the following text input fields: Product name, Quantity in stock, Price per item. The submitted data of the form should be saved in an XML / JSON file with valid XML / JSON syntax. Underneath of the form, the web page should display all of the data which has been submitted in rows ordered by date time submitted, the order of the data columns should be: Product name, Quantity in stock, Price per item, Datetime submitted, Total value number. The "Total value number" should be calculated as (Quantity in stock * Price per item). The last row should how a sum total of all of the Total Value numbers. Solution requirements: Use Php / Html / Javascript / Css. Use Twitter Bootstrap. The form should be submitting the data and updating the data being displayed on the page using Ajax. Thanks in advance.
PMI ACP® Project Management
LVL 12
PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.

Laravel Logo
Laravel is the most sought after web development framework. It comes with ample amount of features that make it easy for developers to work around it. Know about its features in detail.
I have XAMPP running on Windows 10. I am trying to setup a Virtual Host so that when I use "myapp.dev" as a domain I get directly to my public folder of laravel project.
Laravel is located at C:/xampp/htdocs/myapp/public.
By using http://localhost:8000/myapp/public/ i can access laravel index.php
So far i have tried the following:
http v-host.conf file
#this is the default address of XAMPP    
<VirtualHost *:8000>
   DocumentRoot "C:/XAMPP/htdocs/"
   ServerName localhost

<VirtualHost *:8000>
    DocumentRoot "C:/xampp/htdocs/myapp/public"
    ServerName myapp.test
    SetEnv NS_ENV variable_value

and in C:\Windows\System32\drivers\etc\host file localhost myapp.test

and after restarting apache and typing myapp.test leads to iis homepage instead of index.php in public folder.
I would like to find out whether is there a way to perform the following:

1) Include (when $id is not null) and exclude (when $id is null) in the where clause for the code below.
2) Switch between sortByDesc and sortBy based on condition ($sort=='asc' then.... $sort=='desc' then...) for the code below.

   $maxlimit = Product::where('category_id_fk',$id)->with(['child','price','variant','thumbnail','image','description'])->count();
   $products = Product::where('category_id_fk',$id)->with(['child','price','variant','thumbnail','image','description'])->take($recperpage)->get()->sortByDesc('price.list_price');
   $maxlimit = Product::with(['child','price','variant','thumbnail','image','description'])->count();
   $products = Product::with(['child','price','variant','thumbnail','image','description'])->take($recperpage)->get()->sortByDesc('price.list_price');

Open in new window

The objective is to simplify the code above as much as possible but achieve the same result.

Your help is kindly appreciated.
Laravel is one of the best solutions for increasing the revenues of your business. It takes extremely less time for the development of web app using Laravel. The development using laravel is easy and fast. When you are looking for web design services, you want a framework that not only satisfies your specific needs but, a framework, which satisfies multiple needs. A laravel service provider is capable of doing this.
How-Do-Laravel-Development-Services-.jpgWhile doing this, it can boost your business revenue. This blog explains, what makes Laravel service providers the best choice for you to boost your business?
I am a college student. I have some money I inherited and I was thinking about starting an eCommerce site for vapes and juices.

I wanted some advice to see what platform I should use. To show you where my coding skills are at a project I am working on is available at wookify.com.

I've played around with Woocommerce. I'm intrigued by Magento.

I've also wondered about building an ecommerce site from scratch or with Laravel.

Thanks for your help, if I could make 1k a month I could pay expenses. What do I need to begin researching? Is this a foolish use of my money?
can I deploy laravel project without need to install composer into godaddy ?!!
I can't access through SSH , is their another way to work with that .

I start to learn laravel, and in my local machine work fine, I try to deploy at godaddy, most of tutorial need ssh to remotely access and install composer as far as my understanding, and type command line codes to sort things out .

Found a tutorial at youtube allowed me to work laravel without composer, which worked but I couldn't make 404 page work , neither other viewer pages.

working link : http://stchrisapp.com/youtube/
not working 404 page as should be : http://stchrisapp.com/youtube/404   ' it keep show standard godaddy 404 page :( , even if i create other page do same .

I am deploy from windows to Linux server


Laravel is a free, open-source PHP web application framework for the development of web applications following the model–view–controller (MVC) architectural pattern. Some of the features of Laravel are a modular packaging system with a dedicated dependency manager, different ways for accessing relational databases, utilities that aid in application deployment and maintenance, and its orientation toward syntactic sugar. Laravel is regarded as one of the most popular PHP frameworks.

Top Experts In