I'm working on a project , the problem is that some part of the project is made in laravel and some part in core php . Now i want to perform authentication through Auth Facade for my project . Some files are being accessed through routes and some files which are in core php are being accessed directly . so the files which are being accessed through routes Auth is working perfect But what to do for core php files , i don't want to use $_SESSION. Please suggest me a way to use Auth in my core php files.
You can include autoload.php in your core files and then you can try to get laravel functions as we do in WordPress codex.
Related
I am currently learning Laravel. I had a pre-built script and I need to do some changes in it to make it usable... But as much I learnt from the web, I understood that the routes are specified in the Routes/web.php file.
But in the application I'm working on, the routes are defined in Routes/api.php file.
I even tried to find out the HTML pages in the Views folder but it only has the code for the tables which are there on the User Interface. All the controllers also return some data (like... return $data) in the end but no php or blade.php file is mentioned in any controller.
I need to find out the HTML pages so that I can change some components or elements from that website.
Please help me with this. Thanks!
there are two possibilities:1- the application is only used for backend purposes, which is why the developer used API instead of routes.
or the application is made by laravel/vuejs. again laravel for backend and vue js for frontend.
in the second case try to search for .vue files
You should look for blade templates. You can find them in resources/views
directory, these files have .blade.php extension.
I'm using vuejs to create a complex website that will have user registration and login. I want to implement userfrosting framweork to manage users registration/login workflow but I'm not sure how to implement in in my existing vue project. I've read the documentation and I've successfully installed all the needed dependencies and I'm able to see the final directory. The problem is that it will rely on a custom index.php file and I already have my vue template to use. At the moment I've created the userfrosting folder inside the src folder of my vue project. How I can make the two things working togheter?
I was implementing "Register With Social Login Buttons". I downloaded the Google Client API library via Composer. I tested that outside the yii2 framework environment and everything is working absolutely fine and I have also received the user information.
When I put all the required libraries and my view file inside Yii2 framework's folder and tried to access that view file, It is showing me an error which is included below :
Below is my folder structure in simple PHP
Here is my folder structure in Yii2 framework
Can someone help me to solve this problem?
As error says: no class found. Means autoloader is not working.
Your require autoload is wrong. Your Yii structure is different and vendor folder is 2 levels back.
Try use this path:
require '../../vendor/autoload.php';
Where are the "out-of-the-box" Authentication Controllers and Models for Laravel 5.2.45? I've searched thoroughly and I keep seeing it's in app/http/auth but only HomeController and a minimal Controller.php is there.
Also, It's a fresh install with only minimal edits such as new files to views and assets such as css and js. I used "php artisan make:auth" and the output only stated the new view files.
I'm learning Laravel to replace Codeigniter and this is a stump I've stumbled upon.
The model files are stored directly inside the app directory.
The controller files are stored inside app/Http/Controllers directory. Auth Controller is inside app/Http/Controllers/Auth.
By the way in the mentioned version of laravel no HomeController file is generated by laravel.
There was a great post that applied to CI 1.7.2 about using CI models outside CI. It worked like a charm.
http://codeigniter.com/wiki/Calling_CI_models_from_outside_script/
Then I upgraded to 2.0 and the code written in the above post was no longer applicable. I am having a hard time trying to get this to work in 2.0. The Config.php file is no longer in the libraries folder in addition to the Language.php and Model.php files.
Does anyone have an idea of how to port this to 2.0 ?
I only need the models. I was using them in an incoming email extension to our application and using the CI models that we had written saved a lot of time. Any help would be greatly appreciated. . .
I have no idea what this package does, or what issues you're having (forgot to say?), but in 2.0 you need to be looking in the "core" directory rather than the "codeigniter" directory.