Currently utilizing Laravel 4, I am looking to refresh a view and update the content (essentially change the language) Upon arriving at the index page : In my controller : public function getIndex() { $lang = $this->retrieveLang("FR"); ...
Currently, I am using Laravel 4 and attempting to seed the database with some users. Instead of extending from Eloquent, my User model extends ConfideUser as per the instructions due to the use of the Zizaco Confide plugin. I have also made some modificati ...
In my current controller code, I am displaying a set of records. Here is the snippet: public function view() { $title = "View Guardian Information"; $vPa = DB::table('dbo_guardianinformation') ->join('dbo_cities ...
In one of my blade templates, I have a function call that should receive a string as its first parameter. However, Laravel seems to be interpreting the string and adding a ternary operation because it detects a '?' symbol followed by 'or'. Here's the issu ...
I am facing difficulties in setting cookies through laravel using ajax. Despite reading several questions and posts, I have not been able to find a solution. My issue involves a dropdown that triggers a javascript function to send its value to a controlle ...
I'm currently working on creating a form that will interact with a controller method to insert new data into the database. I am using Laravel Version 4.1 app/views/projects.blade.php <tr> {{Form::open(array('action' => 'Pr ...
I am working on a route called stats. This is how my current routing setup looks like: Route::get('stats', 'StatsController@index'); Route::get('stats/{query}', 'StatsController@store'); The main objective is to display stat data when someone visits the ...
I am working on implementing a code to download a PDF file in the Laravel framework. Controller Code: public function initiatePDFDownload($id){ $service = Service::find($id); $pathArray = explode('/', $service->PDFPath); ...
I am currently facing a challenge with a mail template in Laravel blade that needs to be dynamic and saved in the database. Below is an example of the registration_complete.blade.php file: <html> <body> {{$dynamic_content ...
I need to extract data from a database table that logs requests with an IP address column and a timestamp. My goal is to determine the number of days a specific IP address has made requests. I am currently using Laravel's query builder for this task. This ...
In one of my views, I have integrated a highcharts chart and I am trying to load the data via ajax from an API route that returns a JSON response. Here is the API route I created: Route::get('api/v1/data/{id}', function($id) { //Perform som ...
Is there a more efficient way in Laravel 4 to exclude certain methods from the 'auth.sentry' filter in a controller? Route::get('student/login','StudentController@getLogin'); Route::post('student/login','StudentController@postLogin'); Route::get('stude ...
Recently, I have been utilizing Laravel (4.2) and its inbuilt Mandrill driver to send emails. However, I am facing a challenge in capturing the response from Mandrill. Below is the code snippet I am using to dispatch the message: Mail::queue('emails ...
I am facing a perplexing Laravel 4 issue. I have set up two methods in the same controller, which is declared to be restful. The problem arises when the ajax request comes from a different domain. The first method does not work: public function getOwnlis ...
Hello there! In my Laravel e-commerce store, I have a list of currency values displayed as checkboxes. When a checkbox is selected, the page reloads to update the currency value. However, the checkbox selection is lost after the page reloads. Any suggest ...
Is there a way to retrieve a variable named "foo" from a Blade template and pass it to a static function defined within the same template? For instance, let's say we have: <div class="collumns large-8"> {{ Helpers::setLetters('variable_n ...
Exploring the most effective way to deliver files or bundles of files via a RESTful API. Considering options: Base64_encode files and include in JSON response Provide file links within JSON response Priority: Private access for certain files requiring ...
Currently, I am experimenting with APIs and my latest project involves utilizing the Google Directions API within my application. To handle this, I have created a form to collect user input and generate the necessary URI directly in the routes.php file: ...
Currently, I am utilizing nodejs, expressjs, and socket.io to trigger events on my web app via a mobile phone connected to the nodejs server. Although the app is primarily built in JavaScript, I have opted to use laravel for data storage within a database ...
Looking for a straightforward way to authenticate users in Symfony similar to Laravel's Auth::attempt(... method. My user entity already implements AdvancedUserInterface, and I've been reviewing the Symfony security documentation. I'm searc ...
My form includes two fields: phone and email, as shown in the image below. By clicking on the plus button, I would like to add an additional text field to the form below the button. Similarly, by clicking on the minus button, I want to remove the text fie ...
In my Laravel 4 application, I have a master layout located at /views/layouts/main.blade.php. However, I want to exclude this master layout from a single view: /views/users/login.blade.php. The main layout is a fully featured bootstrap admin layout with m ...
My form uses AJAX with $.post for GET and POST requests. However, after submitting the form using $.post, my page refreshes and the validation alert in the controller does not work. The AJAX request in the controller is not functioning correctly. Form: ...
Recently, I started learning Laravel and came across a scenario where I have two controllers: CartController with the function finalizeCart and PaymentController with the function postPayment. Now, I am trying to figure out how to transfer the variable " ...
I have been using this method to automatically fetch user and replies when serializing my object to JSON. However, I am not sure if overriding the toArray method is the correct approach for this. What do you think? <?php class Post extends Eloquent ...
In my Laravel 4.2 project, I have a model with a 'status' attribute and declared an accessor to handle it: public function getStatusAttribute($status) { if (isset($this->expires_at) && strtotime(\Carbon\Carbon::now()) > ...
How can we return multiple arrays in JSON format? Suppose we have the following response using Laravel eloquent: $user= User::all(); $post= Post::all(); $comment= Comment:all(); Now, I would like to return a JSON response that includes this data: Respon ...
For Laravel's auth class to function properly, is it necessary to have a database? Does this apply even if the server itself already has its own authentication process in place? I'm interested in utilizing Laravel's Auth class methods to determine whether ...
Here is the script I am using: <script> function selectModSetProd(prodId,setId,objControl){ function ifOK(r){ objControl.style.background="'"+r.color+"'"; } function ifError(e){ alert('An error ...
This is the route that I am using Route::get('login', function(){ return View::make('admins.login'); }); In this code, I have created a admins/login.blade.php file to handle the login view. <!doctype html> <html> <head> <met ...
My Laravel-based website features URLs like this- xyz.com/search/{id}/{name} These URLs have two variables, allowing for multiple variations such as: xyz.com/search/1/katy xyz.com/search/2/john With potentially thousands of such URLs, I need to creat ...
I am trying to retrieve a selected item from a dropdown menu using jQuery and then redirect it to a controller function. This function will return some data to be displayed based on the selected item. I could really use some assistance with this. Here is m ...
As I am not an expert in Ajax, I am seeking guidance to find information on a specific task. Despite searching extensively on Stack Overflow, I either don't comprehend the details or it's not what I need. Uncertain if my goal is feasible at all.. ...
I had a Users table and a group table. When I load the group table, it loads the users which have the same group_id as the group table id. It works, but my issue is that the foreach loop was quite messy. The output ends up looking like this... However, I ...
Currently, I am in the process of transferring an existing REST API to Laravel 4.1, where the API relies on the offset querystring parameter to define the offset for the records. My aim is to utilize Eloquent's default paginate(), but it recognizes the pa ...