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

I have created a custom access right that connected a use->role->module->permission. Now there are certain attributes that I intend to retrieve from my database and use them across my angularjs+laravel application.

My front-end which is built using angularjs, I would like to call a function to retrieve the values in the following manner:

ifAccess('module','permission') //return true or false

The value should be stored as a global setting so that I do not have to make a call to the database off and on to obtain the values. I would only make a call to the database after login. How can I store and retrieve this values in the most secure manner.
0
AWS Certified Solutions Architect - Associate
AWS Certified Solutions Architect - Associate

This course has been developed to provide you with the requisite knowledge to not only pass the AWS CSA certification exam but also gain the hands-on experience required to become a qualified AWS Solutions architect working in a real-world environment.

So on this page I have the ability to clone multiple inputs depending on how many flights a user has:

http://groupplanner.gallitin.com/flight/create?tripID=22&tripName=ABC&depart=07%2F20%2F2017&return=08%2F05%2F2017

When I try to submit that of course it bombs as originally it was not an array and only allowed a single input.

Current code:
public function store(Request $request){

        $flight = new Flight;
        $flight->airline = request('airline');
        $flight->flightNumber = request('flightNumber');
        $flight->departing = date('Y-m-d H:i:s', strtotime(request('departing')));
        $flight->seatNumber = request('seatNumber');
        $flight->tripID = request('tripID');
        $flight->userID = Auth::id();
        $flight->save();
        $tripID = request('tripID');
        $tripName = request('tripName');

        return redirect()->route('flight', ['tripID' => $tripID,'tripName' => $tripName]);

    }

Open in new window


How can I modify this since I now have the data coming across as an array?  Is it just a normal foreach loop like I would do in PHP or is there a better/easier method to do with Laravel and Eloquent?
0
I know how I can get the data needed, but want to follow Laravel/MVC practices here and new to it.

I have a page that stores data that a user sends through a form.  Once they submit they are redirected to a new page that I'd like to display some of the data back to them.

For example, currently any data I want to display I'm just passing in the URL.
$trip = new Trip;
        $trip->tripName = request('tripName');
        $trip->departing = date('Y-m-d H:i:s', strtotime(request('departing')));
        $trip->returning = date('Y-m-d H:i:s', strtotime(request('returning')));
        $trip->save();
        $tripID = $trip->id;
        $tripName = request('tripName');

        return redirect()->route('flight', ['tripID' => $tripID,'tripName' => $tripName]);

Open in new window


Then within the view I just:
{{ $_GET['tripName'] }}

Open in new window


Is that how I should be doing it?  Or when they hit the new view is there an easy way to grab that data with a DB call?  If so should this be done in the view or do I need to serve somehow from the controller?

Thanks
0
Hello Experts,

I would like to know if the is a authentication library within Laravel Framwork can support the following requirements? If so, what is it?

any immediate help is highly appreciated.
-regards

> - Application to prevent the re-use of the last 4 passwords.
> - After 5 failed login attempts to the application, further login attempts will remain locked until the affected account is unlocked by an administrator.
> - Password aging set to no more than 90 days, after that they should be reset.
> - Unused accounts should be disabled after one year of inactivity so that they may not be used to access the application.
> - After 5 failed login attempts to the application, further login attempts will be made impossible until the affected account is unlocked by an administrator.
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
>