<commit_before><?php namespace App\Providers;

use DB;
use Illuminate\Support\ServiceProvider;



class ViewDataServiceProvider extends ServiceProvider {

	/**
	 * Bootstrap the application services.
	 *
	 * @return void
	 */
	public function boot()
	{

		  $this->compserSettingsLink();
      $this->composeUsername();
      $this->composeUsernameSettings();
	}

  /**
	 * Register the application services.
   *
   * @return void
   */
	public function register()
	{
      //
	}

  /**
   *  Setting View Partails for head.blade.php
   *
   */
  public function compserSettingsLink(){

      view()->composer('head', function($view){
              $view->with('UserData', DB::table('users')->select('username')->first());
      });
  }

  /**
   *  Setting View Partails for user.blade.php
   *
   */
  public function composeUsername(){

      view()->composer('user.user', function($view){
              $view->with('UserData', DB::table('users')->select('username')->first());
      });
  }

  /**
   *  Setting View Partails for settings.blade.php
   *
   */
  public function composeUsernameSettings(){

      view()->composer('user.settings', function($view){
              $view->with('UserData', DB::table('users')->select('username')->first());
      });
  }

}<commit_msg>Final update for view partials<commit_after><?php namespace App\Providers;

use DB;
use App\User;
use Illuminate\Support\ServiceProvider;



class ViewDataServiceProvider extends ServiceProvider {

	/**
	 * Bootstrap the application services.
	 *
	 * @return void
	 */
	public function boot()
	{

		  $this->compserSettingsLink();
      $this->composeUsername();
      $this->composeUsernameSettings();
	}

  /**
	 * Register the application services.
   *
   * @return void
   */
	public function register()
	{
      //
	}

  /**
   *  Setting View Partails for head.blade.php
   *
   */
  public function compserSettingsLink(){

      view()->composer('head', function($view){
              $view->with('UserData', \Auth::User());
      });
  }

  /**
   *  Setting View Partails for user.blade.php
   *
   */
  public function composeUsername(){

      view()->composer('user.user', function($view){
              $view->with('UserData', \Auth::User());
      });
  }

  /**
   *  Setting View Partails for settings.blade.php
   *
   */
  public function composeUsernameSettings(){

      view()->composer('user.settings', function($view){
              $view->with('UserData', \Auth::User());
      });
  }

}
{'fraction_non_alphanumeric': 0.16539847817380857, 'fraction_numerical': 0.0, 'mean_word_length': 2.733931240657698, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5438217', 'n_tokens_mistral': 759, 'n_tokens_neox': 723, 'n_words': 142}