Back

workflow automation


houssam posted 3 months ago

How do I automate my work (my business processes) by workflow with laravel? Is there an example that helps in learning and has a beginning?

Pardeeptech replied 3 months ago

One of the more abstract concepts you'll handle when building your business is what the workflow will look like.

Route::get(
    '/', ['as' => 'home', function () {
        return response()->view('home');
    }]
);

// Session related routes
Route::get(
    '/auth/login', ['as' => 'login-index', function() {
        return response()->view('login');
    }]
);

Route::get(
    '/login', ['as' => 'login-index', function() {
        return response()->view('login');
    }]
);

Route::post(
    '/login',
    ['uses' => '[email protected]', 'as' => 'login-action']
);

Route::get(
    '/logout', ['as' => 'logout', function() {
        Auth::logout();
        return redirect()->route('home');
    }]
);

// User related routes
Route::get(
    '/user/new', ['as' => 'user-new', function() {
        return response()->view('newUser');
    }]
);

Route::post(
    '/user/create',
    ['uses' => '[email protected]', 'as' => 'user-create', ]
);

// Vacation Property related routes
Route::get(
    '/property/new',
    ['as' => 'property-new',
     'middleware' => 'auth',
     function() {
         return response()->view('property.newProperty');
     }]
);

Route::get(
    '/properties',
    ['as' => 'property-index',
     'middleware' => 'auth',
     'uses' => '[email protected]']
);

Route::get(
    '/property/{id}',
    ['as' => 'property-show',
     'middleware' => 'auth',
     'uses' => '[email protected]']
);

Route::get(
    '/property/{id}/edit',
    ['as' => 'property-edit',
     'middleware' => 'auth',
     'uses' => '[email protected]']
);

Route::post(
    '/property/edit/{id}',
    ['uses' => '[email protected]',
     'middleware' => 'auth',
     'as' => 'property-edit-action']
);

Route::post(
    '/property/create',
    ['uses' => '[email protected]',
     'middleware' => 'auth',
     'as' => 'property-create']
);

// Reservation related routes
Route::post(
    '/property/{id}/reservation/create',
    ['uses' => '[email protected]',
     'as' => 'reservation-create',
     'middleware' => 'auth']
);

Route::post(
    '/reservation/incoming',
    ['uses' => '[email protected]',
     'as' => 'reservation-incoming']
);
houssam replied 3 months ago

Thank you very much


Sign in to participate in this thread!



We'd like to thank these amazing companies for supporting us