Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x

Laravel

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

We are currently running a laravel 5.3 site using php 5.6 and would like to use caffeine for those users who insist on leaving forms open  on their devices for extended periods of time.
Unfortunately, it seems that the only version of caffeine I can find to install requires php 7.0, which we will not be prepared to upgrade to for some time.
Does anyone have a workaround?
Thanks!
0
Give Your Engineering Team a Productivity Boost
Give Your Engineering Team a Productivity Boost

Learn why container technology is so powerful and how it can provide your team with productivity gains and other benefits.

Hey, guys!

Here's a snippet from a page called "user.class.php:"

 function updateDevices() {
        global $S;
        global $CN;
        date_default_timezone_set('America/Chicago');
        $maxHistory = date('Y-m-d',strtotime("now - 2 weeks"));
        $R = new xajaxResponse();
        $fitBitCalls = array( '/1/user/-/body/weight/date/'.date('Y-m-d').'/'.$maxHistory.'.json',
        '/1/user/-/body/fat/date/'.date('Y-m-d').'/'.$maxHistory.'.json',
        '/1/user/-/body/log/weight/goal.json',
        '/1/user/-/body/log/fat/goal.json',
        '/1/user/-/activities/steps/date/today/max.json',
        '/1/user/-/activities/calories/date/today/'.$maxHistory.'.json',
        '/1/user/-/activities/distance/date/today/'.$maxHistory.'.json',
        );
        //See if this user any devices that have not been synced.
        $stmt = $CN->prepare("SELECT * 	FROM hraUserDevices  UD INNER JOIN hraUserDeviceTypes UT  ON UD.udtID = UT.udtID  WHERE usrID = ? AND (DATEDIFF(day,udFetchedLastDate,getdate()) IS NULL OR DATEDIFF(day,udFetchedLastDate,getdate()) >=1) AND (udUpdating IS NULL  OR udUpdating !=1 OR DATEDIFF(day,udFetchedLastDate,getdate()) >=2)");
        $stmt->execute(array($S->usrID));
        $devices = $stmt->fetchAll();
        $update = $CN->prepare("UPDATE  hraUserDevices SET udUpdating = ? WHERE udID = ? ");

Open in new window


The question I have is, "What is $CN?"

Obviously, it's a database connection. My problem is that it's not defined anywhere on the page, nor is EVER defined that I can see anywhere in the app.

You do, however, have this at the top of the same page:

	private $cn; // $cn = VARIABLE HOLDING THE DB CONNECTION

	function __construct(PDO $conn) {
		if (!isset($conn))
			throw new Exception('User objects must be passed a PDO Connection object ($this->cn) upon construction');
		$this->cn = $conn;
	}

Open in new window


Is there a convention that I'm missing? $CN is not equivalent to $cn, and yet throughout the entire app you see repeated references to $CN but I can't find anywhere that $CN is actually defined.

Any ideas?
0
I started learning Laravel the other day. I reset my Windows 10 laptop back to factory to begin working in Laravel.

To that end I installed Laravel Valet for Windows.

Just after doing all of this, I was asked to update a ColdFusion application.

I know Valet is based on a nginx engine.

Is there any way to configure ColdFusion 2016 developer into it, so I can still use *.dev addresses and see cfm files properly?
0
Hi I want to update the DB when drag and drop.

I post here the question on SO and you can check all the code.

I will be really appreciated, i'm really stocked.

Link: https://stackoverflow.com/questions/45839623/update-database-when-drag
0
We need a website for offering jobs and recruitment just like this one https://www.bayt.com
there are different ways to do that. we can develop our own frame work for it or we can use open source for the backend and maybe tamplates for the front end.
I want you to analyse this project requirements .
Please help me to find the requirements for this project.
0
ErrorException in Macroable.php line 74:
Method appends does not exist. (View: C:\xampp\htdocs\elasticsearch\resources\views\presult.blade.php) (View: C:\xampp\htdocs\elasticsearch\resources\views\presult.blade.php)

foreach($books as $key => $value)

            <article class="one-third">
              <figure><a href="#" title=""><img src="{{ $value['photo_url'] }}" alt="" style="height: 215px!important;" /></a></figure>

              <div class="details">
           
                <h3>{{ $value['name'] }}
                  <span class="stars">{{ $value['class'] }} 
                    <i class="material-icons">&#xE838;</i>
                    <i class="material-icons">&#xE838;</i>
                    <i class="material-icons">&#xE838;</i>
                    <i class="material-icons">&#xE838;</i>
                  </span>
                </h3>
                <span class="address">{{ $value['city_hotel'] }},{{ $value['address'] }}  <a href="hotel?query={{ $value['name'] }}">Show on map</a></span>
                <span class="rating">{{ $value['preferred'] }}</span>
                <span class="price">Max rate  <em>$ {{ $value['maxrate'] }}</em> </span>
                <span class="price">Min rate  <em>$ {{ $value['minrate'] }}</em> </span>
                <div class="description">
                  <p>{{ $value['desc_en'] }}<a href="hotel.html">More info</a></p>
                </div>   
                <a href="{{ $value['hotel_url'] }}" 

Open in new window

0
I am trying to run this command : "php artisan serve " in laravel 5.1 and its giving me a massage "could not open input file artisan"
0
I want to build Laravel based CMS with following requirements:

1. Multi-sites (running on sub-domains, manage own database) each with API access.
2. Admin (manage all sites/database).
3. Same Codebase (can be replicated if needed).
4. Same Database with different data for each site.

Can someone guide me how to develop such system using Laravel 5.4.

I know there are some packages that I can use i.e
Multi Tenant Laravel

This package create separate database/tables for each site, which I think makes problem for me to create single super admin.

Any thoughts?

Thanks.
2

Laravel

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
Laravel
<
Monthly
>

No Top Experts for this time period. Answer questions to earn the title!