An open API service indexing awesome lists of open source software.

https://github.com/abdullahghanem/ajax-blade

Easy AJAX with blade
https://github.com/abdullahghanem/ajax-blade

Last synced: about 1 month ago
JSON representation

Easy AJAX with blade

Awesome Lists containing this project

README

        

# Easy AJAX with blade

## Installation

First, pull in the package through Composer.

```js
"require": {
"ghanem/ajaxblade": "0.2.*"
}
```
or use.

```bash
composer require ghanem/ajaxblade
```

if using Laravel 5, include the service provider within `config/app.php`.

```php
'providers' => [
'Ghanem\Ajaxblade\AjaxbladeServiceProvider'
];
```

now run this comand:

```bash
php artisan vendor:publish
```

## Example
Within your controllers, before you perform a redirect...

```php
public function show()
{
$articles = Article::orderBy('id', 'DESC')->Paginate(20);

return view('home',compact('articles'));
}
```

this is home view :
```html


Document





@foreach ($users as user)
$user->name

@endforeach
@ajaxblade($users)

```