<?php

namespace App\Http\Controllers;

use App\Url;
use Illuminate\Http\Request;
use Illuminate\Session\Store;
use Illuminate\Validation\Factory as Validator;
use Zenapply\Shortener\Facades\Shortener;

class UrlController extends Controller
{
    public function manageUrl(Request $request, Store $session, Validator $validator)
    {
        if ($request->isMethod('post')) {
            if ($request->has('url')) {
                $url = new Url();
                $url->original_url = $request->input('url');
                $url->shortened_url = Shortener::shorten($request->input('url'));
                $url->save();
                \Session::flash('message', 'Record saved');
            }

            return redirect('/view-urls');
        }

        return view('url.manage', []);
    }

    public function viewUrls()
    {
        $urls = Url::all();

        return view('url.view', [
            'urls' => $urls,
            'message' => \Session::get('message')
        ]);
    }
}

<?php

namespace App\Http\Controllers;

use App\Url;
use Illuminate\Http\Request;
use Illuminate\Session\Store;
use Illuminate\Validation\Factory as Validator;
use Zenapply\Shortener\Shortener;

class UrlController extends Controller
{
    public function manageUrl(Request $request, Store $session, Validator $validator)
    {
        if ($request->isMethod('post')) {
            if ($request->has('url')) {
                $this->validate($request, [
                    'url' => 'required|url|unique:urls,original_url',
                ]);

                $this->saveAndFlash($request, $session, $shortener);
            }
        }

        return view('url.manage', []);
    }

    public function viewUrls()
    {
        $urls = Url::all();

        return view('url.view', [
            'urls' => $urls,
            'message' => \Session::get('message')
        ]);
    }

    /**
     * Persist the Url/Route object
     *
     * @param Request   $request
     * @param Shortener $shortener
     *
     * @return bool
     */
    private function save(Request $request, Shortener $shortener)
    {
        $url = new Url();
        $url->original_url = $request->input('url');
        $url->shortened_url = $shortener->shorten($request->input('url'));

        return $url->saveOrFail();
    }

    /**
     * Attempt to persist the record and store an appropriate flash message
     *
     * @param Request   $request
     * @param Store     $session
     * @param Shortener $shortener
     */
    private function saveAndFlash(Request $request, Store $session, Shortener $shortener)
    {
        $message = $this->save($request, $shortener) ? 'Record saved' : 'Record NOT saved';
        $session->flash('message', $message);
    }
}

Add utility methods for saving a Url
Add utility methods for saving a Url

Whilst everything could be added in the manageUrl method, that doesn't
aid readability. So I've split out that functionality in to separate
methods.