bestmomo / laravel5-3-example Goto Github PK
View Code? Open in Web Editor NEWSimple laravel 5-3 example for tutorial
Simple laravel 5-3 example for tutorial
How to redirect the admin, redactor and user on a specific page after login
example
Redirect admin to the admin page after login
Redirect redactor to redactor page after login
Redirect user to homepage after login
Hi
I am using WAMP Server (version 3.0.6) on my machine. I have installed and configured as per the instructions in the README file. After changing the database details in .env file and config/database.php files, accessed the app in browser.
created a database "mydb"
created an user "myusername" / "mypwd" and grant all privileges to this user and database.
eg-->
CREATE USER 'myusername'@'localhost' IDENTIFIED BY 'mypwd';
GRANT ALL PRIVILEGES ON * . * TO 'myusername'@'localhost';
FLUSH PRIVILEGES;
Configuration in app -->
**.env file -->
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=mydb
DB_USERNAME=myusername
DB_PASSWORD=mypwd
config/database.php -->
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'mydb'),
'username' => env('DB_USERNAME', 'myusername'),
'password' => env('DB_PASSWORD', 'mypwd'),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => true,
'engine' => null,
],**
In command prompt 'path/project_folder/' --->
php artisan cache:clear
php artisan config:cache
php artisan serve
Log:
[2017-01-23 09:34:24] local.ERROR: exception 'PDOException' with message 'SQLSTATE[HY000] [1045] Access denied for user 'laravel53_admin'@'localhost' (using password: YES)' in C:\wamp64\www\KVM\laravel-api\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:119
NOTE: To validate if PDO is working or not in my machine -->
Tested the mysql connection with testdb.php:
**<?php
$servername = "localhost";
$dbname = "testdb";
$username = "root";
$password = "";
// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
die("
mysqli Connection failed: " . $conn->connect_error);
}
echo "
mysqli Connected successfully
";
// Working in lcoalhost
// Create connection
$conn = mysqli_connect($servername, $username, $password);
// Check connection
if (!$conn) {
die("
mysqli_connect Connection failed: " . mysqli_connect_error());
}
echo "
mysqli_connect Connected successfully
";
// NOt working in localhost
try {
$conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
// set the PDO error mode to exception
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
echo "
MySQL PDO Connected successfully
";
}
catch(PDOException $e)
{
echo "
MySQL PDO Connection failed: " . $e->getMessage();
}
?>**
Output is
**mysqli Connected successfully
mysqli_connect Connected successfully
MySQL PDO Connection failed: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO)**
PDO in my local machine is not working. The extensions for mysql pdo is active. Restarted WAMP server many times. But it is still not working. Can any one help?
@bestmomo thx in advance
Après connexion, je me retrouve avec cette erreur. Pourtant j'ai suivi votre tutoriel. J'ai peut être oublié quelque chose ?
I know it's probably a simple solution, but considering I'm kinda new to Laravel I can't find where exactly are the variables to modify the content of E-mails is, I tried modifying: Verify.php but it only gave me limited content to modify and not the entire message I want to display to the user.
Any help on this would be great!
upload photo working on local but when upload on server not work
Bonsoir J'essaie d'integrer chatter a votre app. Mais malheuresement il me donne toujours des erreurs .
FatalThrowableError in Model.php line 779: Class 'App\User' not found.
Merci de m'aider.
all project if run with artisan serve how to fixed
windows 10 64bit
in VerifyCsrfToken.php line 68
at VerifyCsrfToken->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing{closure}(object(Request)) in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing{closure}(object(Request)) in StartSession.php line 64
at StartSession->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing{closure}(object(Request)) in EncryptCookies.php line 59
at EncryptCookies->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing{closure}(object(Request)) in Pipeline.php line 104
at Pipeline->then(object(Closure)) in Router.php line 644
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 618
at Router->dispatchToRoute(object(Request)) in Router.php line 596
at Router->dispatch(object(Request)) in Kernel.php line 267
at Kernel->Illuminate\Foundation\Http{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request)) in CheckForMaintenanceMode.php line 46
at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing{closure}(object(Request)) in Pipeline.php line 104
at Pipeline->then(object(Closure)) in Kernel.php line 149
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 116
at Kernel->handle(object(Request)) in index.php line 54
at require_once('C:\xampp\htdocs\project\public\index.php') in server.php line 21
Here is no vendor folder and no .env.example file.
Hi
I use Laravel 5.4. Everything works fine, like a charm, except one thing, a test unit failed: is it for learning ? or something really missing ?
Is is the ResetPasswordTest, failed because a missing Str class in controller.
Many thanks and greetings for this splendid laravel application example !!!
Les messages de confirmation de destruction ne s'affichent pas (ou sont noyés dans le bas noir de la page d'admin) -> peut-être qu'il n'y a qu'a re-générer le fichier back.css (duquel est absent sweetalert.css) mais comme je n'utilise pas elixir, gulp et sass, je n'en suis pas certain...
Gil
Swift_TransportException in AbstractSmtpTransport.php line 383: Expected response code 250 but got code "530", with message "530 5.7.1 Authentication required "
hi sir, I do user testing registration, and I found an error
Expected response code 250 but got code "530", with message "530 5.7.1 Authentication required"
how to resolve this?
thanks
There is no license file on this repo.
Please add a license file.
There is a resend()
method in \app\Http\Controllers\Auth\RegisterController.php
:
public function resend(UserRepository $userRepository, Request $request)
{
if ($request->session()->has('user_id')) {
$user = $userRepository->getById($request->session()->get('user_id'));
$this->notifyUser($user);
return redirect('/')->with('ok', trans('front/verify.resend'));
}
return redirect('/');
}
I don't understand $request->session()->has('user_id')
.
When is there user_id
in session and when is there no user_id
in session?
Hello, after steps guide(slow)(mysql) run command: gulp
And go to site page. But i have error 500. What i do not correct?Sorry for my english -_-
P.S. Just white page and nothing .
First of all, thanks for your great job!
I get this error if I try composer install --no-dev
Generating autoload files
Illuminate\Foundation\ComposerScripts::postInstall
php artisan optimize
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'Magyarjeti\LaravelLipsum\LipsumServiceProvider' not found
Script php artisan optimize handling the post-install-cmd event returned with error code 1
I've installed the application following the steps mentioned in Readme file.
But when I go to path http://localhost/PROJECT_NAME/public, it simply loads the directory listing beside any webpage.
I've also created virtual host file pointing to 'public' folder with url project1.com. But that also does not help.
Can you please guide me what other steps I need to perform before I can see any web page generated.
The following error is shown at medias
Invalid backend configuration.
Readable volumes not available.
I need another section like the blog but only can be access by the registered user.
Either a complete new section or just add an option for the Admin to choose if the post exclusively for registered user. Sorry for my english. Thank you in advance.
Bonjour,
J'ai déjà réussi à supprimer le public de l'url sur d'autres projets sous laravel, mais je n'y arrive pas du tout avec ce projet en 5.3.
Quelqu'un aurait une idée ? J'ai essayé en déplaçant les fichiers plus réécriture de certains chemins, via .htaccess, en combinant les deux, mais impossible rien ne me convient.
Lorsque j'arrive à un semblant de résultat, la page /login me renvoie une 404, mais la home fonctionne malgré tout sans le "public" sur domaine.dev/ par exemple.
Au plaisir
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.