Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

area17/twill

3925 stars
2 code files
View area17/twill on GitHub

src/Helpers/helpers.php

Open in GitHub
//
if (!function_exists('fireCmsEvent')) {
/**
* @param string $eventName
* @param array $input
* @return void
*/
function fireCmsEvent($eventName, $input = [])
{
$method = method_exists(\Illuminate\Events\Dispatcher::class, 'dispatch') ? 'dispatch' : 'fire';
Event::$method($eventName, [$eventName, $input]);
}
}
//

src/Http/Controllers/Admin/SettingController.php

Open in GitHub
class SettingController extends Controller
{
//
public function update($section, Request $request)
{
if (array_key_exists('cancel', $request->all())) {
return $this->redirector->back();
}
 
$this->settings->saveAll($request->except('_token'), $section);
 
fireCmsEvent('cms-settings.saved');
 
return $this->redirector->back();
}
}

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.