rezapasalar/contact-us

There is no license information available for the latest version (dev-master) of this package.

This package is for contact us section.

dev-master 2020-08-08 09:53 UTC

This package is auto-updated.

Last update: 2024-04-08 17:54:39 UTC


README

This package is for the contact section for each website.

Add Provider:

ContactUs\ContactServiceProvider::class,

Add Facade:

'ContactUs' => ContactUs\ContactFacade::class

Command:

php artisan vendor:publish

Command:

php artisan migrate

Tip:

You must have your database name in the .env file. You have registered.

Using:

Route::get("/contact", function () {
    $contctUsForm = \ContactUs::createForm();
    return view("contact.create", compact("contctUsForm"));
})->name("contact.create");

Route::get("/contacts", function () {
    $res = \ContactUs::contacts();
    return view("contact.index", [
        "route" => $res["route"],
        "contacts" => $res["contacts"]
    ]);
});

Route::namespace("\ContactUs\app\Http\Controllers")->group(function () {
    Route::post("/contact", "ContactController@store")->name("contact.store");
});