サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
災害への備え
mattstauffer.com
If you follow anyone in the Laravel world on Twitter, or if you listen to the Laravel Podcast, you know by now that Laravel Dusk is the new face of application testing in the Laravel world. The background of application testing in Laravel First, a quick refresher: while everyone talking about testing uses words a little bit differently, it's pretty well agreed that Unit tests are responsible for t
In Laravel 5.3, it's easier than ever to write and use Vue components out of the box. This means 5.3 has a somewhat more opinionated default frontend stack than previous versions do. But never fear—it's easy to strip out the default components. Let's explore 5.3's JavaScript stack together. Spin up a sample app using the Laravel installer (or, if you're like me, use Lambo) and open up the site in
While Laravel has had the ability to cast your data to and from JSON since version 5.0, it was previously just a convenience—your data was still just stored in a TEXT field. But MySQL 5.7 introduced an actual JSON column type. Laravel 5.3 introduces a simple syntax for lookups and updates based on the value of specific keys in your JSON columns. Let's assume we have a table with a JSON column: ...
When you are creating a site of any significant size in Laravel, your routes file will often get pretty large. One of the first things I do in a new site is group my routes by logically distinct sections like "admin", "auth", "public". Usually each of these groups get their own set of middleware—admin, for example, gets auth. Maybe the API group gets a different auth middleware, and it might get a
If you've never used it, Laravel's route model binding has been around for a while, but Laravel 5.2 is about to make it even easier. The basics of route model binding Let's assume that a common pattern for binding a URL route is something like this: Route::get('shoes/{id}', function ($id) { $shoe = Shoe::findOrFail($id); // Do stuff }); This is something I do a lot. Wouldn't it be nice if you coul
If you've ever run a SaaS (or put any web site with comments or signups on the Internet for any length of time), you've experienced the annoyance of spam signups and comments. But, whether or not you know it, any login forms are likely to get a lot of automated login attempts. Most login forms don't stop an automated attack trying email after email, password after password, and since those aren't
A lot of folks in the PHP community have been checking out PHPStorm lately, including myself and most of the developers I work with. We love the code intelligence we get from PHPStorm, but still miss the speed, quick boot-up, and convenience of Sublime Text. Before I blindly assume PHPStorm is the only way to go, I wanted to see: Can I bring the things a PHP-focused IDE provides PHP developers bac
Continuing in our series about testing and integration testing in Laravel 5.1, let's take a look at some new traits that are available for your tests. Database migrations and data Two of these traits have to do with the behavior of database migrations and database state during your testing. If you have never tested anything that relies on the database, it'll help you to know that it can be hard at
Lumen is a new project from Laravel creator Taylor Otwell. It's a "micro-framework", meaning it's a smaller, faster, leaner version of a full web application framework. PHP has two other popular micro-frameworks, Slim and Silex. Lumen has the same foundation as Laravel, and many of the same components. But Lumen is built for microservices, not so much for user-facing applications (although it can
Since Laravel 5 flattened a lot of the environment-specific structures, much of the configuration that was once stored in different config directories for each environment has now moved into .env files. But one that can't just live in .env is the environment-dependent loading of service providers. On a project we're working on, we want to register our error handlers in service providers, and we wa
When you wanted to customize your error pages—for example, showing a particular cat GIF when your users hit a 404—you’d Google it and follow these instructions by Dries Vints. In Laravel 5 things have changed a bit. TL;DR take me to the solution already Trace it through the code Now, all custom error and exception handling has moved to app/Exceptions/Handler.php. You’ll remember that that’s where
It's very simple to get started in a new Laravel 5 app: composer create-project laravel/laravel my-project-name-here dev-develop --prefer-dist. But what if you have a Laravel 4 app you want to upgrade? You might think the answer is to upgrade the Composer dependencies and then manually make the changes. Quite a few folks have created walkthroughs for that process, and it's possible—but there are a
Laravel 5.0 Laravel 5.0 is coming out in November, and there are a lot of features that have folks excited. The New Directory structure is, in my mind, a lot more in line with how most developers work; Flysystem integration will make working with files endlessly more flexible and powerful; Contracts is a great step towards making Laravel-friendly packages that aren’t Laravel-dependent; and Sociali
:where(:not(.full-bleed))]:container h-full [&>:where(:not(.full-bleed))]:max-w-6xl [&>:where(:not(.full-bleed))]:px-6 md:py-12 py-6 [&>:where(:not(.full-bleed))]:mx-auto mb-auto content w-full"> Page not found What’s worse, a hilarious 404 page can’t be found either.
Heroku has had PHP support for a while, but it's been a definitively second-class citizen. Yesterday Heroku announced a huge boost in their PHP support, including out-of-the-box Composer support and an intention to become a legitimate destination for hosting modern PHP apps. So, let's take a look at the fastest and simplest way to get a stock Laravel install up and running on Heroku. Pre-requisite
このページを最初にブックマークしてみませんか?
『Matt Stauffer』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く