One of PHP's weak points is its internal error reporting. Enhance your application error reporting with logging. On development environments we must see every error shown by the application. This does not apply for a production environment. On a production environment you must log your errors differently. Let's view an approach to do this.
- [Narrator] On a real life scenario, you wouldn't want…your application to show error messages on the browser.…To keep track of things, Symfony can use Monologue,…which is a logging tool.…Since Symfony has already imported it,…we can use it directly without any need to import.…But first, let's configure the location of the log.…Let's go to config, config dev dot yml,…and let's just hard code a location here.…Let's go to the command line,…and I'm going to go to the desktop,…and I'll get the location of the desktop.…
I'll just copy it...…Paste...…Slash...…Symfony dot log.…Now let's start using our log.…So open any controller...…Going to open ClientsController...…So let's go to our guests route…and let's use Monologue.…We'll do it with "logger" "this"…"get"…"logger"…and let's add entries to the log…with info...…
"User has opened the guest page."…Now let's start our server.…Let's go back to the original show…and let's clear our cache.…And now let's start our server.…Let's go back to the browser…and now let's open Clients.…
- Installing Symfony
- Setting up the local environment
- Exploring the Symfony file structure
- Creating routes
- Sending parameters to a controller
- Using views
- Updating routes
- Creating templates with Twig
- Data modeling with Symfony
- Demo application deployment
Skill Level Intermediate
PHP: Clean URLs on Apache Serverwith David Powers1h 36m Intermediate
PHP: Managing Persistent Sessionswith David Powers2h 41m Intermediate
1. Get Started with Symfony
Install Symfony1m 33s
2. Controllers in Symfony
3. Views in Symfony
4. Data Modeling with Symfony
5. Taking Symfony Further
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.