Skip to content

Releases: inertiajs/inertia-laravel

v0.6.0

10 May 18:11
Compare
Choose a tag to compare

Automatic redirects

Since returning a Redirect::back() response is such a common pattern within an Inertia app, this adapter now does this automatically for you when no response is returned from a controller (#350).

For example, consider this teams controller which redirects back to the previous page after updating a team. With this new feature you can now omit the Redirect::back() response and it will happen automatically.

class TeamsController extends Controller
{
    public function update(Team $team)
    {
        $team->update(/* ... */);
-
-       return Redirect::back();
    }
}

You can disable this behavior, or even do something entirely different, by adding an onEmptyResponse method to your HandleInertiaRequests middleware:

use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;

/**
 * Determines what to do when an Inertia action returned with no response.
 * By default, we'll redirect the user back to where they came from.
 *
 * @param  Request  $request
 * @param  Response  $response
 * @return Response
 */
public function onEmptyResponse(Request $request, Response $response): Response
{
    // Use the default Laravel "empty" response
    return $response;
}

Fixed

  • Fixed namespace issue with Route::inertia() method (#368)
  • Added session check when sharing validation errors (#380)
  • Fixed docblock on facade render method (#387)

v0.5.4

18 Jan 11:00
6a050ce
Compare
Choose a tag to compare

Find release notes here.

v0.5.3

17 Jan 15:00
add5a92
Compare
Choose a tag to compare

Find release notes here.

v0.5.2

12 Jan 16:19
9c8c420
Compare
Choose a tag to compare

Find release notes here.

v0.5.1

07 Jan 18:18
1b2d57a
Compare
Choose a tag to compare

Find release notes here.

v0.5.0

07 Jan 16:40
0855f65
Compare
Choose a tag to compare

Find release notes here.

v0.4.5

27 Oct 09:53
406b15a
Compare
Choose a tag to compare

Find release notes here.

v0.4.4

30 Jul 10:33
3a08d87
Compare
Choose a tag to compare

Find release notes here.

v0.4.3

12 Jul 14:12
bfb6ddf
Compare
Choose a tag to compare

Find release notes here.

v0.4.2

10 May 09:57
7ea4e73
Compare
Choose a tag to compare

Find release notes here.